0.3.0 • Published 10 months ago
@thebadge/sdk v0.3.0
Develop the sdk
- Run lint checker:
yarn lint
- Run tests:
yarn test
- Build sdk:
yarn build
Setup on your project
1) Install the sdk:
npm install @thebadge/sdk
or
yarn add @thebadge/sdk
2) Initialize sdk instance:
const sdkInstance = new TheBadgeSDK(
// check if your chain id is supported with TheBadgeSDK.isChainSupported(chainId)
chainId, // chain id numeric value
// configuration object
{
// read only provider
rpcProviderConfig: {
// your desired provider: 'infura' or 'alchemy'
name: 'infura',
// your infura/alchemy apiKey
apiKey: '00000000000000',
},
// OPTIONAL: web3Provider instance, needed for write methods e.g. mint badge
web3Provider,
// OPTIONAL: use dev mode (relevant only on testnets where qa env is default),
// default value: false
devMode: true,
}
)
Supported chains
Get the list of supported chain ids:
TheBadgeSDK.getSupportedChainIds()
Check if a chain is supported:
TheBadgeSDK.isChainSupported(chainId)
// chainId is a number, for example: 1, 5, etc
Sources of information
0.2.16
11 months ago
0.2.15
11 months ago
0.2.14
1 year ago
0.3.0
10 months ago
0.2.13
1 year ago
0.2.12
1 year ago
0.2.11
1 year ago
0.2.10
2 years ago
0.2.9
2 years ago
0.2.8
2 years ago
0.2.7
2 years ago
0.2.6
2 years ago
0.2.5
2 years ago
0.2.4
2 years ago
0.2.3
2 years ago
0.2.2
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago
0.1.0
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago