Inspect SDK
Installation
We recommend switching to Node.js Version 16 to make sure common crypto dependencies works.
Then run:
Getting Started
Quick Start:
By default, this will apply our public RPC. In case you need to use another RPC, please apply format below
Parameters:
Just input one of 2 options below.
provider
: when using WebsocketProvider or CustomHttpsProviderrpcUrl
: when using httpProvider or other rpcHTTP Web3 Provider
Functions
Init Configuration
initConfig()
allows to init base configuration from OneID SDK
Interface:
Note:
Inspect & Core SDK are using same system config, developer shall only need to init once.
Get Wallet by ID Name
getWalletsByID
will return the Linked Wallet of an ID Name.
Linked Wallet is the wallet address that user actually interacts with when Dapps/Wallets integrated our ONEID SDK
For example, when you transfer assets to ID Name test.c98 on C98 Wallet, the assets are transferred to the Linked Wallet address.
Interface:
Parameters:
chainId
is optionalIf null, OneID will return 100+ chains & its address.
If developers have included chainId, then OneID will return address of that chain.
chainId
has been defined in SDK to be managed easier. In case, the chain does not have public chainID, CHAIN_TYPE will support to get the chain's addressRefer the Supported Chains in Linked Wallet to get mapping of
chainID
Example:
Returns:
Get Primary Name
getPrimaryName
will return the Primary Name of the wallet address.
Primary Name is using as main interacting with DAPPs when the wallet address has multiple ID names. For example, in the OneID website, user shall be able to see their Primary Name on the top right corner.
Note: OneID Primary Name offers multi-chains, hence Developer can use address of any chain to get Primary Name even if it's Solana, Cosmos or EVM
Interface:
Parameters
walletAddress
Example:
Returns:
Get Linked ID Names
getLinkedIDs
will return all the ID Names that linked to the wallets.
Note: this function support EVM address only
Interface:
Parameters
walletAddress
Example:
Returns:
Get Controller Permission
getPermission
will return the address that has permission to edit Records of ID Name.
Interface:
Parameters
ids
Example:
Returns:
Get Node
getNode()
will validate and generate node of an ID Name, then this node shall be used to interact with contract.
Interface:
Parameters
id
Example:
Returns:
Supported Chains in Linked Wallet
Last updated