> For the complete documentation index, see [llms.txt](https://docs.kanalabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kanalabs.io/smart-wallet-sdk/mirai-sdk-the-evm-smart-wallet-and-paymaster/sdk-gateway-functions.md).

# SDK Gateway Functions

<table><thead><tr><th>Functions</th><th>Description</th></tr></thead><tbody><tr><td><p></p><p></p><pre class="language-typescript"><code class="lang-typescript">async initialize(network?: NetworkNames)
</code></pre></td><td><p>To initialize the SDK instance specify a network, and return the result of initialization.</p><p>Returns KanaWallet address</p></td></tr><tr><td><p></p><p></p><pre class="language-typescript"><code class="lang-typescript">async destroy(network?: NetworkNames)
</code></pre></td><td>To destroy the SDK instance specifying a network for destruction, or destroying all instances if no network is provided.</td></tr><tr><td><p></p><p></p><p></p><pre class="language-typescript"><code class="lang-typescript">async getNativeBalance(network?: NetworkNames)
</code></pre></td><td>To get the native token balance of the smart wallet. Returns native token balance</td></tr><tr><td><p></p><p></p><pre class="language-typescript"><code class="lang-typescript">erc1155(collectionAddress: string, network?: NetworkNames)
</code></pre></td><td>To get the ERC1155 collection instance for building ERC1155 transactions. Returns the ERC1155 contract instance</td></tr><tr><td><p></p><p></p><pre class="language-typescript"><code class="lang-typescript">erc20(tokenAddress: string, network?: NetworkNames)
</code></pre></td><td>To get the ERC20 token instance for building ERC20 transactions. Returns the ERC20 contract instance</td></tr><tr><td><p></p><p></p><pre class="language-typescript"><code class="lang-typescript">erc721(collectionAddress: string, network?: NetworkNames)
</code></pre></td><td>To get the ERC721 collection instance for building ERC721 transactions. Returns the ERC721 contract instance</td></tr><tr><td><p></p><p></p><pre class="language-typescript"><code class="lang-typescript">getAptosInstance(network: NetworkNames)
</code></pre></td><td>Retrieve the Aptos SDK instance</td></tr><tr><td><p></p><pre class="language-typescript"><code class="lang-typescript">getProvider(network: NetworkNames): providers.JsonRpcProvider 
</code></pre></td><td><p></p><p>To get the RPC Provider for the given network. Returns providers.JsonRpcProvider</p><p><strong>Example</strong> <code>const provider = getProvider(networkName)</code></p></td></tr><tr><td></td><td></td></tr><tr><td><p></p><p></p><pre class="language-typescript"><code class="lang-typescript">isNetworkActive(networkName: string): boolean
</code></pre></td><td><p>To check if the given network is available and active. Returns bool</p><p><strong>Example</strong> <code>const isActive = isNetworkActive(networkName)</code></p></td></tr><tr><td><p></p><p></p><pre class="language-typescript"><code class="lang-typescript">setCurrentInstance(network: NetworkNames)
</code></pre></td><td>To set the default SDK instance and retrieve the SDK instance associated with the specified network  </td></tr><tr><td></td><td></td></tr></tbody></table>
