Documentation Index
Fetch the complete documentation index at: https://docs.moca.network/llms.txt
Use this file to discover all available pages before exploring further.
Swap Interface
showSwapUI()
Opens the AIR Kit swap interface, allowing users to exchange tokens directly within your application. Method Signature:- Opens the swap interface
- User selects token and amount to swap
- User confirms the swap transaction
- Returns the transaction hash upon successful completion
- User must be logged in
- Experimental feature: This method is marked as experimental and may change in future versions
- Chain support: Currently only supported on Base network
- User experience: Opens a full swap interface with token selection, amount input, and slippage settings.
- Advanced control: For more control over the swap flow, use the RPC method
air_getSwapQuoteandair_sendSwapTransactionto specify exact token addresses, amounts, and slippage settings
On-Ramp Interface
showOnRampUI()
Opens the AIR Kit on-ramp interface, allowing users to purchase cryptocurrency with fiat currency. Method Signature:- Opens the on-ramp interface
- User selects payment method and amount
- User completes the fiat-to-crypto purchase
- Cryptocurrency is deposited to their wallet
- User must be logged in
- Experimental feature: This method is marked as experimental and may change in future versions
- No return value: This method doesn’t return a transaction hash as the purchase is handled by the on-ramp provider
- Currency support: Supported currencies depend on the on-ramp provider configuration