Initialize the SDK
Installation
Configuration
The SDK will automatic load configuration from API server (GET: /configs/internal-config
). However, you can set your alternative configuration as you want.
Parameters
NFT2Client:
apiKey
(string): Account API key.apiEndpoint
(string): endpoint of protocol API. Optional. Using for multiple environment.
ChainConfig:
chainId
(number): chain id of current chain.providerUrl
(string): RPC endpoint for current chain.factoryAddress
(string): Factory contract address on current chain.subQueryEndpoint
(string): Subquery endpoint for current chain.
NOTE: when update config manually, all chainId
, providerUrl
, factoryAddress
, subQueryEndpoint
is required. If some chains hadn't configured, you couldn't call SDK function for those chain.
Last updated