SDK Gateway Functions
async initialize(network?: NetworkNames)To initialize the SDK instance specify a network, and return the result of initialization.
Returns KanaWallet address
async destroy(network?: NetworkNames)To destroy the SDK instance specifying a network for destruction, or destroying all instances if no network is provided.
async getNativeBalance(network?: NetworkNames)To get the native token balance of the smart wallet. Returns native token balance
erc1155(collectionAddress: string, network?: NetworkNames)To get the ERC1155 collection instance for building ERC1155 transactions. Returns the ERC1155 contract instance
erc20(tokenAddress: string, network?: NetworkNames)To get the ERC20 token instance for building ERC20 transactions. Returns the ERC20 contract instance
erc721(collectionAddress: string, network?: NetworkNames)To get the ERC721 collection instance for building ERC721 transactions. Returns the ERC721 contract instance
getAptosInstance(network: NetworkNames)Retrieve the Aptos SDK instance
getProvider(network: NetworkNames): providers.JsonRpcProvider To get the RPC Provider for the given network. Returns providers.JsonRpcProvider
Example const provider = getProvider(networkName)
isNetworkActive(networkName: string): booleanTo check if the given network is available and active. Returns bool
Example const isActive = isNetworkActive(networkName)
setCurrentInstance(network: NetworkNames)To set the default SDK instance and retrieve the SDK instance associated with the specified network
Last updated