Kana Labs
  • Getting Started
    • Welcome to Kana Labs
  • CROSS CHAIN SWAPS
    • AMM DEX Aggregator
  • INTEGRATE KANA WIDGET
    • Kana Widget
      • Install Widget
      • Configure Widget
      • Configure Aptos Keyless
  • Web3 Aggregator SDK
    • Web3 Aggregator SDK
      • Installation
      • SameChain
      • Cross Chain Swap
      • Aggregator API's
  • SPOT TRADING PLATFORM
    • Kana Trade
      • API Docs
  • PERPETUAL FUTURES
    • Kana Perps
      • Getting Started
        • Mint Tokens on Testnet
      • Breaking Down Kana Perps
        • Assets Supported
        • Order Types
        • Orderbook
        • Funding Rate
        • Leverage
        • Margin and Liquidation
        • Hedge Mode
          • Hedging a Short-Term 2-3% Price Decline
          • Dual Positioning for Flexible Profit-Taking
        • Trading Fees
      • API Docs
        • Installation Setup
        • Kana Perps Typescript REST API
        • Kana Perps Python Websocket API
        • Kana Perps Python REST API
        • Steps to place an order
        • Perps Contract Error Codes
        • Websocket Connection
        • Supported Markets
  • SPOT & PERP APIs
    • Trading APIs
      • Kana Trade API
      • Kana Perps API
        • Installation Setup
        • Example setup functions
        • Kana Perps Typescript REST API
        • Kana Perps Websocket API
        • Kana Perps Python Websocket API
        • Kana Perps Python REST API
        • Steps to place an order
  • PAYMASTER SERVICE
    • Kana Paymaster For Aptos and Supra
      • How it works?
      • How to Register?
      • Deposit Allowance
      • Manage Users
      • Paymaster SDK Tutorial (Typescript)
      • Paymaster API
      • Module & Function Whitelist
      • Subscription - Coming soon
      • FAQS
  • PERPETUAL OPTIONS
    • OPerps
  • Tokenomics & Governance
    • Kana Labs Tokenomics
  • REWARDS & REFERRAL PROGRAM
    • Rewards Program
      • Reward Program Season 1
      • Reward Program Season 2
      • How to Keep Track of Your Points?
      • Where to find the Missions Dashboard?
  • Referral Program
    • How to Generate Referral Link? (For the Referrer)
    • How to map your wallet to the invite IDs? (For the invited users)
Powered by GitBook
On this page
  1. Smart Wallet SDK
  2. Mirai SDK - The EVM Smart Wallet & Paymaster

SDK Gateway Functions

Last updated 1 year ago

Functions
Description

To initialize the SDK instance specify a network, and return the result of initialization.

Returns KanaWallet address

To destroy the SDK instance specifying a network for destruction, or destroying all instances if no network is provided.

To get the native token balance of the smart wallet. Returns native token balance

To get the ERC1155 collection instance for building ERC1155 transactions. Returns the ERC1155 contract instance

To get the ERC20 token instance for building ERC20 transactions. Returns the ERC20 contract instance

To get the ERC721 collection instance for building ERC721 transactions. Returns the ERC721 contract instance

Retrieve the Aptos SDK instance

To get the RPC Provider for the given network. Returns providers.JsonRpcProvider

Example const provider = getProvider(networkName)

To check if the given network is available and active. Returns bool

Example const isActive = isNetworkActive(networkName)

To set the default SDK instance and retrieve the SDK instance associated with the specified network

async initialize(network?: NetworkNames)
async destroy(network?: NetworkNames)
async getNativeBalance(network?: NetworkNames)
erc1155(collectionAddress: string, network?: NetworkNames)
erc20(tokenAddress: string, network?: NetworkNames)
erc721(collectionAddress: string, network?: NetworkNames)
getAptosInstance(network: NetworkNames)
getProvider(network: NetworkNames): providers.JsonRpcProvider 
isNetworkActive(networkName: string): boolean
setCurrentInstance(network: NetworkNames)