> 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kanalabs.io/smart-wallet-sdk/mirai-sdk-the-evm-smart-wallet-and-paymaster/sdk-gateway-functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
