Moon Docs
  • Introduction
    • What Can Moon Do?
    • What are Moon’s Use Cases?
    • What Features Come with Moon?
    • Supported Networks
  • Getting started with moon
  • Authentication
    • Email and password
    • OAuth 2.0
    • Login with Moon
    • API Key
    • Sign in with Ethereum
    • Passkey
    • Embedded accounts
    • Token Refreshing
  • Interacting with the blockchain
    • EVM
    • Solana
    • Bitcoin
    • Bitcoin cash
    • Litecoin
    • Dogecoin
    • EOS
    • Ripple
    • Tron
  • AI
    • Langchain
    • Whisper
    • Chat GPT
  • Moon Packages
    • @moonup/moon-sdk
    • @moonup/ethers
      • MoonProvider
      • MoonSigner
    • @moonup/wagmi-connector
    • @moonup/viem
    • @moonup/moon-rainbowkit
    • @moonup/moon-react
      • Context
      • hooks
      • Components
    • @moonup/moon-react-native
      • Context
      • Hooks
    • @moonup/moon-api
      • Aave
      • Accounts
      • Bitcoin
      • Bitcoin Cash
      • ConveyorFinance
      • Cosmos
      • Dogecoin
      • Ens
      • EOS
      • Erc20
      • Erc721
      • Erc1155
      • Litecoin
      • OneInch
      • OnRamper
      • Ripple
      • Solana
      • Tron
      • Uniswap
      • Yearn
  • SDKs
    • Flutter
      • AaveApi
      • moonsdk.model.AaveInput
      • moonsdk.model.AaveReservesAPIResponse
      • moonsdk.model.AaveReservesData
      • openapi.model.AbiInput
      • openapi.model.AbiItem
      • openapi.model.AbiOutput
      • moonsdk.model.AccountAPIResponse
      • openapi.model.AccountControllerResponse
      • openapi.model.AccountControllerResponseData
      • moonsdk.model.AccountData
      • moonsdk.model.AccountResponse
      • AccountsApi
      • moonsdk.model.AvailablePaymentMethod
      • moonsdk.model.BalanceAPIResponse
      • moonsdk.model.BalanceResponse
      • moonsdk.model.BitcoinAPIResponse
      • BitcoinApi
      • moonsdk.model.BitcoinCashAPIResponse
      • moonsdk.model.BitcoinCashInput
      • moonsdk.model.BitcoinCashTransactionInput
      • moonsdk.model.BitcoinCashTransactionOutput
      • moonsdk.model.BitcoinInput
      • moonsdk.model.BitcoinTransactionInput
      • moonsdk.model.BitcoinTransactionOutput
      • BitcoincashApi
      • openapi.model.Block
      • moonsdk.model.BroadCastRawTransactionAPIResponse
      • moonsdk.model.BroadCastRawTransactionResponse
      • moonsdk.model.BroadcastInput
      • ConveyorFinanceApi
      • moonsdk.model.ConveyorFinanceControllerResponse
      • moonsdk.model.CosmosAPIResponse
      • CosmosApi
      • moonsdk.model.CosmosInput
      • moonsdk.model.CosmosTransactionInput
      • moonsdk.model.CosmosTransactionOutput
      • moonsdk.model.CreateAccountInput
      • openapi.model.CreatePaymentIntentInput
      • moonsdk.model.CryptoCurrency
      • DefaultApi
      • moonsdk.model.DeployInput
      • moonsdk.model.DogeCoinAPIResponse
      • DogeCoinApi
      • moonsdk.model.DogeCoinInput
      • moonsdk.model.DogeCoinTransactionInput
      • moonsdk.model.DogeCoinTransactionOutput
      • ENSApi
      • openapi.model.ENSReverseResolveResponse
      • ERC1155Api
      • moonsdk.model.EnsResolveAPIResponse
      • moonsdk.model.EnsResolveInput
      • moonsdk.model.EnsResolveResponse
      • moonsdk.model.EosAPIResponse
      • EosApi
      • moonsdk.model.EosInput
      • moonsdk.model.EosTransactionInput
      • moonsdk.model.EosTransactionOutput
      • moonsdk.model.Erc1155Request
      • openapi.model.Erc1155Response
      • Erc20Api
      • openapi.model.Erc20Response
      • Erc4337Api
      • Erc721Api
      • moonsdk.model.Erc721Request
      • openapi.model.Erc721Response
      • moonsdk.model.FiatCurrency
      • moonsdk.model.GetSupportedOnRampsResponse
      • moonsdk.model.GetSupportedOnRampsResponseMessageInner
      • moonsdk.model.GetSupportedOnRampsResponseMessageInnerIcons
      • moonsdk.model.GetSupportedOnRampsResponseMessageInnerIconsPng
      • moonsdk.model.GetSwapDto
      • openapi.model.IERC20Approval
      • openapi.model.IERC20Transfer
      • openapi.model.INFTApproval
      • openapi.model.INFTApprovalERC1155
      • openapi.model.INFTApprovalERC721
      • openapi.model.INFTTransfer
      • openapi.model.INativeBalance
      • openapi.model.IOldNFTApproval
      • openapi.model.IWebhook
      • moonsdk.model.InputBody
      • openapi.model.InternalTransaction
      • moonsdk.model.LitecoinAPIResponse
      • LitecoinApi
      • moonsdk.model.LitecoinInput
      • moonsdk.model.LitecoinTransactionInput
      • moonsdk.model.LitecoinTransactionOutput
      • openapi.model.Log
      • moonsdk.model.Message
      • moonsdk.model.NonceAPIResponse
      • moonsdk.model.NonceResponse
      • OneinchApi
      • OnramperApi
      • PaymentApi
      • openapi.model.PaymentIntentResponse
      • moonsdk.model.PaymentType
      • moonsdk.model.PingResponse
      • moonsdk.model.Quote
      • moonsdk.model.RippleAPIResponse
      • RippleApi
      • moonsdk.model.RippleInput
      • moonsdk.model.RippleTransactionInput
      • moonsdk.model.RippleTransactionOutput
      • moonsdk.model.SellQuote
      • moonsdk.model.SignMessage
      • moonsdk.model.SignMessageAPIResponse
      • moonsdk.model.SignTypedData
      • moonsdk.model.SolanaAPIResponse
      • SolanaApi
      • moonsdk.model.SolanaInput
      • moonsdk.model.SolanaTransactionInput
      • moonsdk.model.SolanaTransactionOutput
      • moonsdk.model.SupportedAssetResponse
      • moonsdk.model.SupportedAssetResponseAssetsInner
      • moonsdk.model.SupportedCurrenciesResponse
      • moonsdk.model.SupportedDefaultResponse
      • moonsdk.model.SupportedDefaultResponseDefaults
      • moonsdk.model.SupportedDefaultResponseDefaultsId
      • moonsdk.model.SupportedPaymentTypesCurrencyResponse
      • moonsdk.model.SupportedPaymentTypesMessage
      • openapi.model.TatumTransactionEvent
      • moonsdk.model.TokenSwapParams
      • moonsdk.model.Transaction
      • moonsdk.model.TransactionAPIResponse
      • moonsdk.model.TransactionData
      • moonsdk.model.TransactionInput
      • moonsdk.model.TransactionInputMetaData
      • moonsdk.model.TransactionInputSupportedParams
      • moonsdk.model.TransactionInputSupportedParamsPartnerData
      • moonsdk.model.TransactionInputSupportedParamsPartnerDataRedirectUrl
      • moonsdk.model.TransactionInputSupportedParamsTheme
      • moonsdk.model.TransactionInputWallet
      • moonsdk.model.TransactionRequest
      • moonsdk.model.TransactionResponse
      • moonsdk.model.TransactionResponseInfo
      • moonsdk.model.TransactionResponseTx
      • openapi.model.TriggerOutput
      • moonsdk.model.TronAPIResponse
      • TronApi
      • moonsdk.model.TronInput
      • moonsdk.model.TronTransactionInput
      • moonsdk.model.TronTransactionOutput
      • moonsdk.model.Tx
      • UniSwapApi
      • moonsdk.model.UniswapInput
      • YearnApi
    • Java
      • AaveApi
      • AaveInput
      • AaveReservesAPIResponse
      • AaveReservesData
      • AbiInput
      • AbiItem
      • AbiOutput
      • AccountAPIResponse
      • AccountControllerResponse
      • AccountControllerResponseData
      • AccountData
      • AccountResponse
      • AccountsApi
      • AvailablePaymentMethod
      • BalanceAPIResponse
      • BalanceResponse
      • BitcoinAPIResponse
      • BitcoinApi
      • BitcoinCashAPIResponse
      • BitcoinCashInput
      • BitcoinCashTransactionInput
      • BitcoinCashTransactionOutput
      • BitcoinInput
      • BitcoinTransactionInput
      • BitcoinTransactionOutput
      • BitcoincashApi
      • Block
      • BroadCastRawTransactionAPIResponse
      • BroadCastRawTransactionResponse
      • BroadcastInput
      • ConveyorFinanceApi
      • ConveyorFinanceControllerResponse
      • CosmosAPIResponse
      • CosmosApi
      • CosmosInput
      • CosmosTransactionInput
      • CosmosTransactionOutput
      • CreateAccountInput
      • CreatePaymentIntentInput
      • CryptoCurrency
      • DefaultApi
      • DeployInput
      • DogeCoinAPIResponse
      • DogeCoinApi
      • DogeCoinInput
      • DogeCoinTransactionInput
      • DogeCoinTransactionOutput
      • ENSReverseResolveResponse
      • EnsApi
      • EnsResolveAPIResponse
      • EnsResolveInput
      • EnsResolveResponse
      • EosAPIResponse
      • EosApi
      • EosInput
      • EosTransactionInput
      • EosTransactionOutput
      • Erc1155Api
      • Erc1155Request
      • Erc1155Response
      • Erc20Api
      • Erc20Response
      • Erc4337Api
      • Erc721Api
      • Erc721Request
      • Erc721Response
      • FiatCurrency
      • GetSupportedOnRampsResponse
      • GetSupportedOnRampsResponseMessageInner
      • GetSupportedOnRampsResponseMessageInnerIcons
      • GetSupportedOnRampsResponseMessageInnerIconsPng
      • GetSwapDto
      • IERC20Approval
      • IERC20Transfer
      • INFTApproval
      • INFTApprovalERC1155
      • INFTApprovalERC721
      • INFTTransfer
      • INativeBalance
      • IOldNFTApproval
      • IWebhook
      • InputBody
      • InternalTransaction
      • LitecoinAPIResponse
      • LitecoinApi
      • LitecoinInput
      • LitecoinTransactionInput
      • LitecoinTransactionOutput
      • Log
      • Message
      • NonceAPIResponse
      • NonceResponse
      • OneinchApi
      • OnramperApi
      • PaymentApi
      • PaymentIntentResponse
      • PaymentType
      • PingResponse
      • Quote
      • RippleAPIResponse
      • RippleApi
      • RippleInput
      • RippleTransactionInput
      • RippleTransactionOutput
      • SellQuote
      • SignMessage
      • SignMessageAPIResponse
      • SignTypedData
      • SolanaAPIResponse
      • SolanaApi
      • SolanaInput
      • SolanaTransactionInput
      • SolanaTransactionOutput
      • SupportedAssetResponse
      • SupportedAssetResponseAssetsInner
      • SupportedCurrenciesResponse
      • SupportedDefaultResponse
      • SupportedDefaultResponseDefaults
      • SupportedDefaultResponseDefaultsId
      • SupportedPaymentTypesCurrencyResponse
      • SupportedPaymentTypesMessage
      • TatumTransactionEvent
      • TokenSwapParams
      • Transaction
      • TransactionAPIResponse
      • TransactionData
      • TransactionInput
      • TransactionInputMetaData
      • TransactionInputSupportedParams
      • TransactionInputSupportedParamsPartnerData
      • TransactionInputSupportedParamsPartnerDataRedirectUrl
      • TransactionInputSupportedParamsTheme
      • TransactionInputWallet
      • TransactionRequest
      • TransactionResponse
      • TransactionResponseInfo
      • TransactionResponseTx
      • TriggerOutput
      • TronAPIResponse
      • TronApi
      • TronInput
      • TronTransactionInput
      • TronTransactionOutput
      • Tx
      • UniSwapApi
      • UniswapInput
      • YearnApi
    • Kotlin
      • AaveApi
      • AaveInput
      • AaveReservesAPIResponse
      • AaveReservesData
      • AbiInput
      • AbiItem
      • AbiOutput
      • AccountAPIResponse
      • AccountControllerResponse
      • AccountControllerResponseData
      • AccountData
      • AccountResponse
      • AccountsApi
      • AvailablePaymentMethod
      • BalanceAPIResponse
      • BalanceResponse
      • BitcoinAPIResponse
      • BitcoinApi
      • BitcoinCashAPIResponse
      • BitcoinCashInput
      • BitcoinCashTransactionInput
      • BitcoinCashTransactionOutput
      • BitcoinInput
      • BitcoinTransactionInput
      • BitcoinTransactionOutput
      • BitcoincashApi
      • Block
      • BroadCastRawTransactionAPIResponse
      • BroadCastRawTransactionResponse
      • BroadcastInput
      • ConveyorFinanceApi
      • ConveyorFinanceControllerResponse
      • CosmosAPIResponse
      • CosmosApi
      • CosmosInput
      • CosmosTransactionInput
      • CosmosTransactionOutput
      • CreateAccountInput
      • CreatePaymentIntentInput
      • CryptoCurrency
      • DefaultApi
      • DeployInput
      • DogeCoinAPIResponse
      • DogeCoinApi
      • DogeCoinInput
      • DogeCoinTransactionInput
      • DogeCoinTransactionOutput
      • ENSApi
      • ENSReverseResolveResponse
      • ERC1155Api
      • EnsResolveAPIResponse
      • EnsResolveInput
      • EnsResolveResponse
      • EosAPIResponse
      • EosApi
      • EosInput
      • EosTransactionInput
      • EosTransactionOutput
      • Erc1155Request
      • Erc1155Response
      • Erc20Api
      • Erc20Response
      • Erc4337Api
      • Erc721Api
      • Erc721Request
      • Erc721Response
      • FiatCurrency
      • GetSupportedOnRampsResponse
      • GetSupportedOnRampsResponseMessageInner
      • GetSupportedOnRampsResponseMessageInnerIcons
      • GetSupportedOnRampsResponseMessageInnerIconsPng
      • GetSwapDto
      • IERC20Approval
      • IERC20Transfer
      • INFTApproval
      • INFTApprovalERC1155
      • INFTApprovalERC721
      • INFTTransfer
      • INativeBalance
      • IOldNFTApproval
      • IWebhook
      • InputBody
      • InternalTransaction
      • LitecoinAPIResponse
      • LitecoinApi
      • LitecoinInput
      • LitecoinTransactionInput
      • LitecoinTransactionOutput
      • Log
      • Message
      • NonceAPIResponse
      • NonceResponse
      • OneinchApi
      • OnramperApi
      • PaymentApi
      • PaymentIntentResponse
      • PaymentType
      • PingResponse
      • Quote
      • RippleAPIResponse
      • RippleApi
      • RippleInput
      • RippleTransactionInput
      • RippleTransactionOutput
      • SellQuote
      • SignMessage
      • SignMessageAPIResponse
      • SignTypedData
      • SolanaAPIResponse
      • SolanaApi
      • SolanaInput
      • SolanaTransactionInput
      • SolanaTransactionOutput
      • SupportedAssetResponse
      • SupportedAssetResponseAssetsInner
      • SupportedCurrenciesResponse
      • SupportedDefaultResponse
      • SupportedDefaultResponseDefaults
      • SupportedDefaultResponseDefaultsId
      • SupportedPaymentTypesCurrencyResponse
      • SupportedPaymentTypesMessage
      • TatumTransactionEvent
      • TokenSwapParams
      • Transaction
      • TransactionAPIResponse
      • TransactionData
      • TransactionInput
      • TransactionInputMetaData
      • TransactionInputSupportedParams
      • TransactionInputSupportedParamsPartnerData
      • TransactionInputSupportedParamsPartnerDataRedirectUrl
      • TransactionInputSupportedParamsTheme
      • TransactionInputWallet
      • TransactionRequest
      • TransactionResponse
      • TransactionResponseInfo
      • TransactionResponseTx
      • TriggerOutput
      • TronAPIResponse
      • TronApi
      • TronInput
      • TronTransactionInput
      • TronTransactionOutput
      • Tx
      • UniSwapApi
      • UniswapInput
      • YearnApi
    • Python
      • AaveApi
      • AaveInput
      • AaveReservesAPIResponse
      • AaveReservesData
      • AbiInput
      • AbiItem
      • AbiOutput
      • AccountAPIResponse
      • AccountControllerResponse
      • AccountControllerResponseData
      • AccountData
      • AccountResponse
      • AccountsApi
      • AvailablePaymentMethod
      • BalanceAPIResponse
      • BalanceResponse
      • BitcoinAPIResponse
      • BitcoinApi
      • BitcoinCashAPIResponse
      • BitcoinCashInput
      • BitcoinCashTransactionInput
      • BitcoinCashTransactionOutput
      • BitcoinInput
      • BitcoinTransactionInput
      • BitcoinTransactionOutput
      • BitcoincashApi
      • Block
      • BroadCastRawTransactionAPIResponse
      • BroadCastRawTransactionResponse
      • BroadcastInput
      • ConveyorFinanceApi
      • ConveyorFinanceControllerResponse
      • CosmosAPIResponse
      • CosmosApi
      • CosmosInput
      • CosmosTransactionInput
      • CosmosTransactionOutput
      • CreateAccountInput
      • CreatePaymentIntentInput
      • CryptoCurrency
      • DefaultApi
      • DeployInput
      • DogeCoinAPIResponse
      • DogeCoinApi
      • DogeCoinInput
      • DogeCoinTransactionInput
      • DogeCoinTransactionOutput
      • ENSApi
      • ENSReverseResolveResponse
      • ERC1155Api
      • EnsResolveAPIResponse
      • EnsResolveInput
      • EnsResolveResponse
      • EosAPIResponse
      • EosApi
      • EosInput
      • EosTransactionInput
      • EosTransactionOutput
      • Erc1155Request
      • Erc1155Response
      • Erc20Api
      • Erc20Response
      • Erc4337Api
      • Erc721Api
      • Erc721Request
      • Erc721Response
      • FiatCurrency
      • GetSupportedOnRampsResponse
      • GetSupportedOnRampsResponseMessageInner
      • GetSupportedOnRampsResponseMessageInnerIcons
      • GetSupportedOnRampsResponseMessageInnerIconsPng
      • GetSwapDto
      • IERC20Approval
      • IERC20Transfer
      • INFTApproval
      • INFTApprovalERC1155
      • INFTApprovalERC721
      • INFTTransfer
      • INativeBalance
      • IOldNFTApproval
      • IWebhook
      • InputBody
      • InternalTransaction
      • LitecoinAPIResponse
      • LitecoinApi
      • LitecoinInput
      • LitecoinTransactionInput
      • LitecoinTransactionOutput
      • Log
      • Message
      • NonceAPIResponse
      • NonceResponse
      • OneinchApi
      • OnramperApi
      • PaymentApi
      • PaymentIntentResponse
      • PaymentType
      • PingResponse
      • Quote
      • RippleAPIResponse
      • RippleApi
      • RippleInput
      • RippleTransactionInput
      • RippleTransactionOutput
      • SellQuote
      • SignMessage
      • SignMessageAPIResponse
      • SignTypedData
      • SolanaAPIResponse
      • SolanaApi
      • SolanaInput
      • SolanaTransactionInput
      • SolanaTransactionOutput
      • SupportedAssetResponse
      • SupportedAssetResponseAssetsInner
      • SupportedCurrenciesResponse
      • SupportedDefaultResponse
      • SupportedDefaultResponseDefaults
      • SupportedDefaultResponseDefaultsId
      • SupportedPaymentTypesCurrencyResponse
      • SupportedPaymentTypesMessage
      • TatumTransactionEvent
      • TokenSwapParams
      • Transaction
      • TransactionAPIResponse
      • TransactionData
      • TransactionInput
      • TransactionInputMetaData
      • TransactionInputSupportedParams
      • TransactionInputSupportedParamsPartnerData
      • TransactionInputSupportedParamsPartnerDataRedirectUrl
      • TransactionInputSupportedParamsTheme
      • TransactionInputWallet
      • TransactionRequest
      • TransactionResponse
      • TransactionResponseInfo
      • TransactionResponseTx
      • TriggerOutput
      • TronAPIResponse
      • TronApi
      • TronInput
      • TronTransactionInput
      • TronTransactionOutput
      • Tx
      • UniSwapApi
      • UniswapInput
      • YearnApi
    • Rust
      • \AaveApi
      • AaveInput
      • AaveReservesApiResponse
      • AaveReservesData
      • AbiInput
      • AbiItem
      • AbiOutput
      • AccountApiResponse
      • AccountControllerResponse
      • AccountControllerResponseData
      • AccountData
      • AccountResponse
      • \AccountsApi
      • AvailablePaymentMethod
      • BalanceApiResponse
      • BalanceResponse
      • \BitcoinApi
      • BitcoinApiResponse
      • BitcoinCashApiResponse
      • BitcoinCashInput
      • BitcoinCashTransactionInput
      • BitcoinCashTransactionOutput
      • BitcoinInput
      • BitcoinTransactionInput
      • BitcoinTransactionOutput
      • \BitcoincashApi
      • Block
      • BroadCastRawTransactionApiResponse
      • BroadCastRawTransactionResponse
      • BroadcastInput
      • \ConveyorFinanceApi
      • ConveyorFinanceControllerResponse
      • \CosmosApi
      • CosmosApiResponse
      • CosmosInput
      • CosmosTransactionInput
      • CosmosTransactionOutput
      • CreateAccountInput
      • CreatePaymentIntentInput
      • CryptoCurrency
      • \DefaultApi
      • DeployInput
      • \DogeCoinApi
      • DogeCoinApiResponse
      • DogeCoinInput
      • DogeCoinTransactionInput
      • DogeCoinTransactionOutput
      • \EnsApi
      • EnsResolveApiResponse
      • EnsResolveInput
      • EnsResolveResponse
      • EnsReverseResolveResponse
      • \EosApi
      • EosApiResponse
      • EosInput
      • EosTransactionInput
      • EosTransactionOutput
      • \Erc1155Api
      • Erc1155Request
      • Erc1155Response
      • \Erc20Api
      • Erc20Response
      • \Erc4337Api
      • \Erc721Api
      • Erc721Request
      • Erc721Response
      • FiatCurrency
      • GetSupportedOnRampsResponse
      • GetSupportedOnRampsResponseMessageInner
      • GetSupportedOnRampsResponseMessageInnerIcons
      • GetSupportedOnRampsResponseMessageInnerIconsPng
      • GetSwapDto
      • INativeBalance
      • IOldNftApproval
      • IWebhook
      • Ierc20Approval
      • Ierc20Transfer
      • InftApproval
      • InftApprovalErc1155
      • InftApprovalErc721
      • InftTransfer
      • InputBody
      • InternalTransaction
      • \LitecoinApi
      • LitecoinApiResponse
      • LitecoinInput
      • LitecoinTransactionInput
      • LitecoinTransactionOutput
      • Log
      • Message
      • NonceApiResponse
      • NonceResponse
      • \OneinchApi
      • \OnramperApi
      • \PaymentApi
      • PaymentIntentResponse
      • PaymentType
      • PingResponse
      • Quote
      • \RippleApi
      • RippleApiResponse
      • RippleInput
      • RippleTransactionInput
      • RippleTransactionOutput
      • SellQuote
      • SignMessage
      • SignMessageApiResponse
      • SignTypedData
      • \SolanaApi
      • SolanaApiResponse
      • SolanaInput
      • SolanaTransactionInput
      • SolanaTransactionOutput
      • SupportedAssetResponse
      • SupportedAssetResponseAssetsInner
      • SupportedCurrenciesResponse
      • SupportedDefaultResponse
      • SupportedDefaultResponseDefaults
      • SupportedDefaultResponseDefaultsId
      • SupportedPaymentTypesCurrencyResponse
      • SupportedPaymentTypesMessage
      • TatumTransactionEvent
      • TokenSwapParams
      • Transaction
      • TransactionApiResponse
      • TransactionData
      • TransactionInput
      • TransactionInputMetaData
      • TransactionInputSupportedParams
      • TransactionInputSupportedParamsPartnerData
      • TransactionInputSupportedParamsPartnerDataRedirectUrl
      • TransactionInputSupportedParamsTheme
      • TransactionInputWallet
      • TransactionRequest
      • TransactionResponse
      • TransactionResponseInfo
      • TransactionResponseTx
      • TriggerOutput
      • \TronApi
      • TronApiResponse
      • TronInput
      • TronTransactionInput
      • TronTransactionOutput
      • Tx
      • \UniSwapApi
      • UniswapInput
      • \YearnApi
    • Swift
      • AaveInput
      • AaveReservesAPIResponse
      • AaveReservesData
      • AccountAPIResponse
      • AccountData
      • AccountsAPI
      • AvailablePaymentMethod
      • BalanceAPIResponse
      • BitcoinAPI
      • BalanceResponse
      • BitcoincashAPI
      • BitcoinCashAPIResponse
      • BitcoinAPIResponse
      • BitcoinCashInput
      • BitcoinCashTransactionInput
      • BitcoinCashTransactionOutput
      • BitcoinInput
      • BitcoinTransactionInput
      • BitcoinTransactionOutput
      • BroadcastInput
      • BroadCastRawTransactionAPIResponse
      • BroadCastRawTransactionResponse
      • ConveyorFinanceAPI
      • ConveyorFinanceControllerResponse
      • CosmosAPI
      • CosmosInput
      • CosmosAPIResponse
      • CosmosTransactionInput
      • CreateAccountInput
      • DefaultAPI
      • CryptoCurrency
      • DeployInput
      • DogeCoinAPI
      • DogeCoinTransactionInput
      • DogeCoinAPIResponse
      • DogeCoinInput
      • DogeCoinTransactionInput
      • DogeCoinTransactionOutput
      • ENSAPI
      • EnsResolveAPIResponse
      • EnsResolveInput
      • EnsResolveResponse
      • EosAPIResponse
      • EosAPI
      • EosTransactionInput
      • EosTransactionOutput
      • Erc20API
      • Erc721Request
      • Erc721API
      • Erc1155Request
      • Erc4337API
      • ERC1155API
      • FiatCurrency
      • GetSupportedOnRampsResponse
      • GetSupportedOnRampsResponseMessageInner
      • GetSupportedOnRampsResponseMessageInnerIconsPng
      • GetSupportedOnRampsResponseMessageInnerIcons
      • GetSwapDto
      • LitecoinAPI
      • LitecoinAPIResponse
      • LitecoinTransactionInput
      • LitecoinInput
      • LitecoinTransactionOutput
      • Message
      • NonceAPIResponse
      • NonceResponse
      • OneinchAPI
      • OnramperAPI
      • PaymentType
      • PingResponse
      • RippleAPI
      • Quote
      • RippleAPIResponse
      • RippleTransactionOutput
      • RippleInput
      • SellQuote
      • SignMessage
      • SignMessageAPIResponse
      • SignTypedData
      • SolanaAPI
      • SolanaAPIResponse
      • SolanaTransactionInput
      • SolanaInput
      • SolanaTransactionOutput
      • SupportedAssetResponse
      • SupportedAssetResponseAssetsInner
      • SupportedDefaultResponse
      • SupportedCurrenciesResponse
      • SupportedDefaultResponseDefaultsId
      • SupportedDefaultResponseDefaults
      • SupportedPaymentTypesCurrencyResponse
      • SupportedPaymentTypesMessage
      • TokenSwapParams
      • Transaction
      • TransactionAPIResponse
      • TransactionData
      • TransactionInput
      • TransactionInputMetaData
      • TransactionInputSupportedParams
      • TransactionInputSupportedParamsPartnerDataRedirectUrl
      • TransactionInputSupportedParamsTheme
      • TransactionInputWallet
      • TransactionRequest
      • TransactionResponse
      • TransactionResponseInfo
      • TransactionResponseTx
      • TronAPIResponse
      • TronAPI
      • TronInput
      • TronTransactionInput
      • TronTransactionOutput
      • Tx
      • UniSwapAPI
      • UniswapInput
      • YearnAPI
    • Golang
      • \AaveAPI
      • AaveInput
      • AaveReservesData
      • AaveReservesAPIResponse
      • AccountAPIResponse
      • AccountData
      • AccountResponse
      • AvailablePaymentMethod
      • \AccountsAPI
      • BalanceResponse
      • BalanceAPIResponse
      • \BitcoinAPI
      • BitcoinAPIResponse
      • BitcoinAPIResponse
      • \BitcoincashAPI
      • BitcoinCashAPIResponse
      • BitcoinCashInput
      • BitcoinCashTransactionInput
      • BitcoinCashTransactionOutput
      • BitcoinInput
      • BitcoinInput
      • BitcoinTransactionInput
      • BitcoinTransactionOutput
      • BroadcastInput
      • BroadCastRawTransactionAPIResponse
      • BroadCastRawTransactionResponse
      • \ConveyorFinanceAPI
      • ConveyorFinanceControllerResponse
      • \CosmosAPI
      • CosmosAPIResponse
      • CosmosInput
      • \AaveAPI
      • CosmosTransactionInput
      • CreateAccountInput
      • CosmosTransactionOutput
      • CryptoCurrency
      • \DefaultAPI
      • \DogeCoinAPI
      • DeployInput
      • DogeCoinAPIResponse
      • DogeCoinInput
      • DogeCoinTransactionInput
      • DogeCoinTransactionOutput
      • \ENSAPI
      • EnsResolveAPIResponse
      • \EosAPI
      • EnsResolveResponse
      • EosAPIResponse
      • EosInput
      • EosTransactionInput
      • EosTransactionOutput
      • \Erc721API
      • \Erc20API
      • Erc721Request
      • Erc1155Request
      • \ERC1155API
      • FiatCurrency
      • GetSupportedOnRampsResponse
      • GetSupportedOnRampsResponseMessageInner
      • GetSupportedOnRampsResponseMessageInnerIcons
      • GetSupportedOnRampsResponseMessageInnerIconsPng
      • GetSwapDto
      • InputBody
      • \LitecoinAPI
      • LitecoinAPIResponse
      • LitecoinAPIResponse
      • LitecoinInput
      • LitecoinTransactionOutput
      • Message
      • LitecoinTransactionInput
      • NonceAPIResponse
      • NonceResponse
      • \OneinchAPI
      • \OnramperAPI
      • PaymentType
      • PingResponse
      • Quote
      • \RippleAPI
      • RippleTransactionInput
      • RippleAPIResponse
      • RippleInput
      • RippleTransactionOutput
      • SellQuote
      • SignMessage
      • SignMessageAPIResponse
      • SignTypedData
      • \SolanaAPI
      • SolanaAPIResponse
      • SolanaInput
      • SolanaTransactionOutput
      • SolanaTransactionInput
      • SupportedAssetResponse
      • SupportedAssetResponseAssetsInner
      • SupportedCurrenciesResponse
      • SupportedDefaultResponseDefaults
      • SupportedDefaultResponseDefaultsId
      • SupportedPaymentTypesCurrencyResponse
      • SupportedPaymentTypesMessage
      • TokenSwapParams
      • TransactionAPIResponse
      • Transaction
      • TransactionInputMetaData
      • TransactionInputSupportedParams
      • TransactionInputSupportedParamsPartnerData
      • TransactionInputSupportedParamsPartnerDataRedirectUrl
      • TransactionInputSupportedParamsTheme
      • TransactionInputWallet
      • TransactionRequest
      • TransactionResponse
      • TransactionResponseInfo
      • TransactionResponseTx
      • \TronAPI
      • TronAPIResponse
      • TronInput
      • TronTransactionInput
      • TronTransactionOutput
      • Tx
      • \UniSwapAPI
      • UniswapInput
      • \YearnAPI
    • Unity
      • AaveApi
      • com.usemoon.MoonSDK.Model.AaveInput
      • com.usemoon.MoonSDK.Model.AaveReservesAPIResponse
      • com.usemoon.MoonSDK.Model.AaveReservesData
      • com.usemoon.MoonSDK.Model.AbiInput
      • com.usemoon.MoonSDK.Model.AbiItem
      • com.usemoon.MoonSDK.Model.AbiOutput
      • com.usemoon.MoonSDK.Model.AccountControllerResponse
      • com.usemoon.MoonSDK.Model.AccountControllerResponseData
      • com.usemoon.MoonSDK.Model.AccountData
      • com.usemoon.MoonSDK.Model.AccountResponse
      • com.usemoon.MoonSDK.Model.AvailablePaymentMethod
      • com.usemoon.MoonSDK.Model.BalanceAPIResponse
      • AccountsApi
      • BitcoinApi
      • com.usemoon.MoonSDK.Model.BitcoinAPIResponse
      • BitcoincashApi
      • com.usemoon.MoonSDK.Model.BitcoinCashAPIResponse
      • com.usemoon.MoonSDK.Model.BitcoinCashTransactionInput
      • com.usemoon.MoonSDK.Model.BitcoinCashTransactionOutput
      • com.usemoon.MoonSDK.Model.BitcoinCashInput
      • com.usemoon.MoonSDK.Model.BitcoinInput
      • com.usemoon.MoonSDK.Model.BitcoinTransactionInput
      • com.usemoon.MoonSDK.Model.BitcoinTransactionOutput
      • com.usemoon.MoonSDK.Model.BroadcastInput
      • com.usemoon.MoonSDK.Model.Block
      • com.usemoon.MoonSDK.Model.BroadCastRawTransactionAPIResponse
      • com.usemoon.MoonSDK.Model.BroadCastRawTransactionResponse
      • com.usemoon.MoonSDK.Model.ConveyorFinanceControllerResponse
      • ConveyorFinanceApi
      • com.usemoon.MoonSDK.Model.CosmosInput
      • CosmosApi
      • com.usemoon.MoonSDK.Model.CosmosAPIResponse
      • com.usemoon.MoonSDK.Model.CosmosTransactionOutput
      • com.usemoon.MoonSDK.Model.CreateAccountInput
      • com.usemoon.MoonSDK.Model.CreatePaymentIntentInput
      • com.usemoon.MoonSDK.Model.CryptoCurrency
      • DefaultApi
      • com.usemoon.MoonSDK.Model.DeployInput
      • DogeCoinApi
      • com.usemoon.MoonSDK.Model.DogeCoinAPIResponse
      • com.usemoon.MoonSDK.Model.DogeCoinTransactionInput
      • com.usemoon.MoonSDK.Model.DogeCoinInput
      • com.usemoon.MoonSDK.Model.DogeCoinTransactionInput
      • com.usemoon.MoonSDK.Model.DogeCoinTransactionOutput
      • ENSApi
      • com.usemoon.MoonSDK.Model.EnsResolveAPIResponse
      • com.usemoon.MoonSDK.Model.EnsResolveInput
      • com.usemoon.MoonSDK.Model.EnsResolveResponse
      • com.usemoon.MoonSDK.Model.ENSReverseResolveResponse
      • EosApi
      • com.usemoon.MoonSDK.Model.EosAPIResponse
      • com.usemoon.MoonSDK.Model.EosTransactionOutput
      • com.usemoon.MoonSDK.Model.EosTransactionInput
      • com.usemoon.MoonSDK.Model.EosTransactionOutput
      • Erc20Api
      • com.usemoon.MoonSDK.Model.Erc20Response
      • Erc721Api
      • com.usemoon.MoonSDK.Model.Erc721Request
      • com.usemoon.MoonSDK.Model.Erc721Response
      • com.usemoon.MoonSDK.Model.Erc1155Response
      • com.usemoon.MoonSDK.Model.Erc1155Request
      • ERC1155Api
      • com.usemoon.MoonSDK.Model.FiatCurrency
      • com.usemoon.MoonSDK.Model.GetSupportedOnRampsResponse
      • com.usemoon.MoonSDK.Model.GetSupportedOnRampsResponseMessageInner
      • com.usemoon.MoonSDK.Model.GetSupportedOnRampsResponseMessageInnerIcons
      • com.usemoon.MoonSDK.Model.GetSwapDto
      • com.usemoon.MoonSDK.Model.GetSupportedOnRampsResponseMessageInnerIconsPng
      • com.usemoon.MoonSDK.Model.IERC20Approval
      • com.usemoon.MoonSDK.Model.IERC20Transfer
      • com.usemoon.MoonSDK.Model.INFTApproval
      • com.usemoon.MoonSDK.Model.INativeBalance
      • com.usemoon.MoonSDK.Model.INFTApprovalERC721
      • com.usemoon.MoonSDK.Model.INFTTransfer
      • com.usemoon.MoonSDK.Model.INFTApprovalERC1155
      • com.usemoon.MoonSDK.Model.InputBody
      • com.usemoon.MoonSDK.Model.InternalTransaction
      • com.usemoon.MoonSDK.Model.IWebhook
      • com.usemoon.MoonSDK.Model.IOldNFTApproval
      • LitecoinApi
      • com.usemoon.MoonSDK.Model.LitecoinAPIResponse
      • com.usemoon.MoonSDK.Model.LitecoinTransactionInput
      • com.usemoon.MoonSDK.Model.LitecoinTransactionOutput
      • com.usemoon.MoonSDK.Model.Message
      • com.usemoon.MoonSDK.Model.Log
      • com.usemoon.MoonSDK.Model.NonceAPIResponse
      • com.usemoon.MoonSDK.Model.NonceResponse
      • OneinchApi
      • OnramperApi
      • PaymentApi
      • com.usemoon.MoonSDK.Model.PaymentIntentResponse
      • com.usemoon.MoonSDK.Model.PaymentType
      • com.usemoon.MoonSDK.Model.PingResponse
      • com.usemoon.MoonSDK.Model.Quote
      • RippleApi
      • com.usemoon.MoonSDK.Model.RippleAPIResponse
      • com.usemoon.MoonSDK.Model.RippleInput
      • com.usemoon.MoonSDK.Model.RippleTransactionInput
      • com.usemoon.MoonSDK.Model.RippleTransactionOutput
      • com.usemoon.MoonSDK.Model.SellQuote
      • com.usemoon.MoonSDK.Model.SignMessage
      • com.usemoon.MoonSDK.Model.SignMessageAPIResponse
      • com.usemoon.MoonSDK.Model.SignTypedData
      • SolanaApi
      • com.usemoon.MoonSDK.Model.SolanaTransactionInput
      • com.usemoon.MoonSDK.Model.SolanaAPIResponse
      • com.usemoon.MoonSDK.Model.SupportedAssetResponse
      • com.usemoon.MoonSDK.Model.SolanaTransactionOutput
      • com.usemoon.MoonSDK.Model.SupportedAssetResponseAssetsInner
      • com.usemoon.MoonSDK.Model.SupportedCurrenciesResponse
      • com.usemoon.MoonSDK.Model.SupportedDefaultResponse
      • com.usemoon.MoonSDK.Model.SupportedDefaultResponseDefaultsId
      • com.usemoon.MoonSDK.Model.SupportedDefaultResponseDefaults
      • com.usemoon.MoonSDK.Model.SupportedPaymentTypesCurrencyResponse
      • com.usemoon.MoonSDK.Model.SupportedPaymentTypesMessage
      • com.usemoon.MoonSDK.Model.TokenSwapParams
      • com.usemoon.MoonSDK.Model.Transaction
      • com.usemoon.MoonSDK.Model.TransactionAPIResponse
      • com.usemoon.MoonSDK.Model.TransactionData
      • com.usemoon.MoonSDK.Model.TransactionInput
      • com.usemoon.MoonSDK.Model.TransactionInputMetaData
      • com.usemoon.MoonSDK.Model.TransactionInputSupportedParams
      • com.usemoon.MoonSDK.Model.TransactionInputSupportedParamsPartnerDataRedirectUrl
      • com.usemoon.MoonSDK.Model.TransactionInputSupportedParamsPartnerData
      • com.usemoon.MoonSDK.Model.TransactionInputSupportedParamsTheme
      • com.usemoon.MoonSDK.Model.TransactionInputSupportedParamsPartnerDataRedirectUrl
      • com.usemoon.MoonSDK.Model.TransactionInputWallet
      • com.usemoon.MoonSDK.Model.TransactionRequest
      • com.usemoon.MoonSDK.Model.TransactionRequest
      • com.usemoon.MoonSDK.Model.TransactionResponseInfo
      • com.usemoon.MoonSDK.Model.TransactionResponse
      • com.usemoon.MoonSDK.Model.TriggerOutput
      • com.usemoon.MoonSDK.Model.TransactionResponseTx
      • TronApi
      • com.usemoon.MoonSDK.Model.TronAPIResponse
      • com.usemoon.MoonSDK.Model.TronInput
      • com.usemoon.MoonSDK.Model.TronTransactionInput
      • com.usemoon.MoonSDK.Model.TronTransactionOutput
      • com.usemoon.MoonSDK.Model.Tx
      • UniSwapApi
      • com.usemoon.MoonSDK.Model.UniswapInput
      • YearnApi
  • Security
  • API Reference
    • About
    • API reference
      • Accounts
        • Nonce
        • Balance
        • Suggest gas
        • Estimate
        • Transfer eth
        • Sign message
        • Sign transaction
        • Export
        • Sign typed data
        • Deploy
        • Broadcast tx
        • Encode data
      • Bitcoin
        • Sign tx
        • Src20 inscription
        • Brc20 tx
        • Generate unsigned psbt
        • Export
        • Delete
      • Cosmos
        • Export
        • Sign transfer
        • Sign message
        • Sign ibc transfer
      • Dogecoin
        • Sign tx
        • Export
        • Delete
        • Memo sign tx
      • Eos
        • Sign tx
        • Export
        • Delete
      • Litecoin
        • Sign tx
        • Export
        • Delete
        • Memo sign tx
      • Ripple
        • Sign tx
        • Export
        • Delete
      • Solana
        • Sign tx
        • Multi sign tx
        • Transfer
        • Transfer tokens
        • Export
        • Delete
      • Tron
        • Sign tx
        • Export
        • Delete
      • Allora
        • Inference
        • Log return to percentage
        • Implied future price
      • Bitcoincash
        • Accounts
          • Export
          • Delete
          • Sign tx
          • Memo sign tx
          • Sign btc tx
          • Generate unsigned psbt
          • Sign psbt with key path and script path
      • Data
        • Analysis
        • Balance
        • History
        • Token metadata
        • Nfts
        • Portfolio
          • Status
        • Query
        • Debank
          • Tokens
          • Complex protocols
          • All tokens
          • Total balance
      • Cookiefun
        • Kols
          • Network
          • Community
        • Predictive
        • Tweets
          • Trending
        • Narratives
          • Trending
        • Tokens
          • Analytics
          • Trending
      • Ens
        • Resolve
        • Reverse
      • Erc1155
        • Balance of
        • Balance of batch
        • Set approval for all
        • Is approved for all
        • Safe transfer from
        • Safe batch transfer from
      • Erc20
        • Decimals
        • Symbol
        • Name
        • TotalSupply
        • BalanceOf
        • Allowance
        • Approve
        • Transfer
        • TransferFrom
      • Erc4626
        • Asset
        • TotalAssets
        • ConvertToShares
        • ConvertToAssets
        • MaxDeposit
        • Deposit
        • Withdraw
        • MaxMint
        • MaxWithdraw
        • MaxRedeem
        • PreviewDeposit
        • PreviewMint
        • PreviewWithdraw
        • PreviewRedeem
        • Mint
        • Redeem
        • TotalSupply
        • BalanceOf
        • Allowance
        • Approve
        • Transfer
        • TransferFrom
      • Erc721
        • BalanceOf
        • OwnerOf
        • Name
        • Symbol
        • TokenURI
        • GetApproved
        • IsApprovedForAll
        • Approve
        • SetApprovalForAll
        • TransferFrom
        • SafeTransferFrom
        • SafeTransferFromWithData
      • Financial datasets
        • Company facts
        • Income statements
        • Balance sheets
        • Cash flow statements
        • Segmented revenues
        • All financials
        • Available tickers
        • Insider transactions
        • Options chain
        • Prices
        • Search financials
        • Price snapshot
        • Search line items
      • Jupiter
        • ProgramIdToLabel
        • IndexedRouteMap
        • Tokens
        • Quote
        • Swap
        • SwapInstructions
        • CreateLimitOrder
        • CancelLimitOrders
        • OpenOrders
        • OrderHistory
      • Lending pool
        • Flash loan premium
        • Revision
        • Max reserves
        • Max stable rate borrow size percent
        • Borrow
        • Deposit
        • Flash loan
        • Repay
        • Swap borrow rate mode
        • Set user use reserve as collateral
        • Liquidation call
        • Reserve data
        • User account data
        • Reserves list
        • Addresses provider
        • Paused
      • Leverager
        • Addresses provider
        • Default admin role
        • Lending pool
        • Min hf
        • Paused
        • Weth
        • Role admin
        • Has role
        • Supports interface
        • Deleverage erc20
        • Deleverage native
        • Execute operation
        • Grant role
        • Leverage erc20
        • Leverage native
        • Pause
        • Renounce role
        • Revoke role
        • Unpause
      • Lifi
        • Quote
        • Status
        • Chains
        • Tools
        • Tokens
        • Token
        • Connections
        • AllPossibleConnections
      • Makefuntoken
        • CLFactory
        • MaxTick
        • MinTick
        • MakeToken
        • SetTickLimits
        • SetSupplyLimits
      • Multicall
        • Create job
        • Execute job
        • Job result
        • Schedule job
        • Unschedule job
        • Scheduled jobs
        • Jobs
        • Job
        • Flows
        • User defined functions
        • Notifications
          • Mark as read
      • Odos
        • Swap
        • Get quote
        • Get zap quote
        • Zap
        • Assemble transaction
        • Supported chains
        • Contract info
        • Router address
        • Executor address
        • Liquidity sources
        • Supported tokens
        • Current block
      • Onramper
        • Currencies
        • Payment types
          • Fiat
        • Defaults
        • Assets
        • Onramps
        • Quotes
          • Buy
          • Sell
        • Fund
          • ${accountName}
      • Opensea
        • CreateOffer
        • CreateCollectionOffer
        • Collection
        • Nft
        • WrapEth
        • UnwrapWeth
      • Polymarket
        • CreateOrder
        • CreateMarketBuyOrder
        • PostOrder
        • CancelOrder
        • CancelOrders
        • CancelMarketOrders
        • UpdateBalanceAllowance
        • DropNotifications
        • Markets
        • ApproveForPolymarket
        • Market
        • OrderBook
        • OpenOrders
        • Order
        • Trades
        • Notifications
        • BalanceAllowance
        • PricesHistory
        • MarketTradeEvents
      • Thorswap
        • Quote
        • Swap
        • GasPrice
        • SupportedChains
        • SupportedProviders
      • TradingBot
        • Configs
        • Start
        • Stop
        • Activate
        • Deactivate
        • Trigger
        • TweetReplyTest
        • Restart
        • Status
        • LastRunResults
        • Personality
        • Twitter
          • CreateTweet
          • FollowingTimeline
          • Conversation
          • Tweet
            • History
      • Lynex
        • Data
          • Assets
          • Pools
            • Type
            • Top apr
          • Tvl
          • Vote distribution
        • Nft
          • BalanceOf
          • OwnerOf
          • TokenURI
          • LockDetails
          • CreateLock
          • IncreaseLockAmount
          • IncreaseUnlockTime
          • TotalSupply
          • TokenOfOwnerByIndex
          • TokenByIndex
          • Delegate
          • Merge
          • Split
          • Claim
          • UnlockPermanent
          • Name
          • Symbol
          • GetApproved
          • IsApprovedForAll
          • BalanceOfNFT
          • BalanceOfNFTAt
          • TotalNftsMinted
          • Delegates
          • GetVotes
          • GetPastVotes
          • VestedPayout
          • VestedPayoutAtTime
          • VestingPayout
          • VestingPeriod
          • Approve
          • SetApprovalForAll
          • TransferFrom
          • SafeTransferFrom
          • Burn
          • CreateDelegatedLockFor
          • CreateLockFor
          • Checkpoint
          • CheckpointDelegatee
          • SetClaimApproval
          • SetClaimApprovalForAll
          • DelegateBySig
          • GlobalCheckpoint
        • Router
          • Factory
          • WETH
          • GetAmountOut
          • GetAmountsOut
          • AddLiquidity
          • AddLiquidityETH
          • SwapExactTokensForTokens
          • SwapExactETHForTokens
          • SwapExactTokensForETH
        • Voter
          • TotalWeight
          • Weights
          • IsGauge
          • IsWhitelisted
          • LastVoted
          • PoolVoteLength
          • Vote
          • Reset
          • Poke
          • CreateGauge
          • KillGauge
          • ReviveGauge
          • NotifyRewardAmount
          • Distribute
          • ClaimBribes
          • ClaimFees
          • ClaimRewards
          • Whitelist
          • VoteWithOptimalDistribution
      • Ramses
        • Data
          • Pools
            • Type
            • Top apr
          • Tokens
          • Info
          • Tvl
          • Vote distribution
        • Nft
          • BalanceOf
          • OwnerOf
          • Approve
          • CreateLock
          • IncreaseAmount
          • IncreaseUnlockTime
          • Withdraw
          • TokenURI
          • TotalSupply
          • Delegate
          • TransferFrom
          • Merge
          • Split
          • BalanceOfNFT
          • Locked
          • GetVotes
          • GetPastVotes
          • Delegates
          • Abstain
          • Attach
          • Detach
        • Router
          • UNSAFE swapExactTokensForTokens
          • AddLiquidity
          • AddLiquidityETH
          • RemoveLiquidity
          • RemoveLiquidityETH
          • SwapExactTokensForTokens
          • SwapExactETHForTokens
          • SwapExactTokensForETH
          • Factory
          • GetAmountOut
          • GetAmountsOut
          • GetReserves
          • IsPair
          • PairFor
          • QuoteAddLiquidity
          • QuoteRemoveLiquidity
          • SortTokens
          • Weth
        • Voter
          • TotalWeight
          • Weights
          • IsGauge
          • IsWhitelisted
          • LastVoted
          • Vote
          • Reset
          • Poke
          • AttachTokenToGauge
          • DetachTokenFromGauge
          • CreateGauge
          • KillGauge
          • ReviveGauge
          • NotifyRewardAmount
          • Distribute
          • ClaimBribes
          • ClaimFees
          • ClaimRewards
          • Whitelist
          • VoteWithOptimalDistribution
      • Thena
        • Data
          • Fusions
            • Type
            • Top apr
          • Tvl
          • Vote distribution
          • Tokens
            • Top
          • Pairs
            • Top
        • Nft
          • BalanceOf
          • OwnerOf
          • TokenURI
          • GetApproved
          • IsApprovedForAll
          • BalanceOfNFT
          • TotalSupply
          • Locked
          • LockedEnd
          • CreateLock
          • CreateLockFor
          • IncreaseLockAmount
          • IncreaseUnlockTime
          • Withdraw
          • Approve
          • SetApprovalForAll
          • TransferFrom
          • SafeTransferFrom
          • Merge
          • Split
          • Voting
          • Abstain
          • Attach
          • Detach
          • DepositFor
          • Checkpoint
          • Delegate
          • DelegateBySig
          • GetLastUserSlope
          • UserPointHistory
          • UserPointHistoryTS
          • BalanceOfAtNFT
          • TotalSupplyAt
          • TotalSupplyAtT
          • GetPastVotes
          • GetPastTotalSupply
          • GetVotes
          • Delegates
        • Voter
          • TotalWeight
          • Weights
          • IsGauge
          • Vote
          • Reset
          • Poke
          • CreateGauge
          • VoteWithOptimalDistribution
          • IsWhitelisted
          • LastVoted
          • PoolVoteLength
          • AttachTokenToGauge
          • DetachTokenFromGauge
          • KillGauge
          • ReviveGauge
          • NotifyRewardAmount
          • Distribute
          • ClaimBribes
          • ClaimFees
          • ClaimRewards
          • Whitelist
      • Aave
        • V3
          • Pool
            • GetReserveData
            • GetUserAccountData
            • Supply
            • Withdraw
            • Borrow
            • Repay
            • SetUserUseReserveAsCollateral
            • LiquidationCall
          • PoolAddressProvider
            • GetACLAdmin
            • GetACLManager
            • GetAddress
            • GetMarketId
            • GetPool
            • GetPoolConfigurator
            • GetPriceOracle
            • SetACLAdmin
            • SetACLManager
            • SetAddress
            • SetMarketId
            • SetPoolConfiguratorImpl
            • SetPoolImpl
          • PoolAddressProviderRegistry
            • GetAddressesProvider
            • GetATokenTotalSupply
            • GetAllATokens
            • GetAllReservesTokens
            • GetDebtCeiling
          • Rewards
            • RewardsByAsset
            • UserRewards
            • RewardsData
            • ClaimRewards
            • ClaimRewardsOnBehalf
            • ClaimRewardsToSelf
            • ClaimAllRewards
            • ClaimAllRewardsOnBehalf
            • ClaimAllRewardsToSelf
          • Incentives
            • FullReservesIncentiveData
            • ReservesIncentivesData
            • UserReservesIncentivesData
          • Pool data
            • Eth currency unit
            • Reserves data
            • Reserves list
            • User reserves data
            • Market reference currency price in usd proxy aggregator
            • Network base token price in usd proxy aggregator
          • Wallet balance
            • Balance of
            • Batch balance of
            • User wallet balances
      • Uniswap
        • V2
          • Router
            • WETH
            • AddLiquidity
            • AddLiquidityETH
            • GetAmountIn
            • GetAmountOut
            • GetAmountsIn
            • GetAmountsOut
            • Quote
            • RemoveLiquidity
            • RemoveLiquidityETH
            • RemoveLiquidityETHSupportingFeeOnTransferTokens
            • RemoveLiquidityETHWithPermit
            • RemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens
            • RemoveLiquidityWithPermit
            • SwapETHForExactTokens
            • SwapExactETHForTokens
            • SwapExactETHForTokensSupportingFeeOnTransferTokens
            • SwapExactTokensForETH
            • SwapExactTokensForETHSupportingFeeOnTransferTokens
            • SwapExactTokensForTokens
            • SwapExactTokensForTokensSupportingFeeOnTransferTokens
            • SwapTokensForExactETH
            • SwapTokensForExactTokens
        • V3
          • Nft
            • Mint
            • IncreaseLiquidity
            • DecreaseLiquidity
            • Collect
            • Burn
            • CreateAndInitializePoolIfNecessary
            • Approve
            • SetApprovalForAll
            • TransferFrom
            • Permit
            • Multicall
            • SweepToken
            • UnwrapWETH9
            • RefundETH
            • Positions
            • TokenOfOwnerByIndex
            • BalanceOf
            • DOMAIN SEPARATOR
            • PERMIT TYPEHASH
            • WETH9
            • Factory
            • Name
            • Symbol
            • TokenURI
            • BaseURI
            • OwnerOf
            • GetApproved
            • IsApprovedForAll
            • TotalSupply
            • TokenByIndex
            • SupportsInterface
          • Router
            • ExactInput
            • ExactInputSingle
            • ExactOutput
            • ExactOutputSingle
            • Multicall
            • RefundETH
            • SelfPermit
            • SelfPermitAllowed
            • SelfPermitAllowedIfNecessary
            • SelfPermitIfNecessary
            • SweepToken
            • SweepTokenWithFee
            • UnwrapWETH9
            • UnwrapWETH9WithFee
            • WETH9
            • Factory
    • Specification
Powered by GitBook
On this page
  • SIWE User Authentication using an Ethereum Address
  • Step 1: Fetch a Nonce from Moon
  • Step 2: User Signs a Message
  • Step 3: Verify the SIWE Signature
  • Step 4: Handle Final Response from Moon’s Server
  • Full code for example:
Edit on GitHub
  1. Authentication

Sign in with Ethereum

SIWE User Authentication using an Ethereum Address

Moon allows an app to authenticate a user using SIWE (Sign in with Ethereum). The process to implement SIWE into a Moon app involves the following steps:

Step 1: Fetch a Nonce from Moon

The first step in the SIWE authentication process is to obtain a nonce by calling the getSIWENonce method from the MoonSDK class and passing the user's Ethereum address. Moon will then generate a nonce, associate it with the user's session, and return it.

What is a nonce?

A nonce is a random number that can be used just once in a cryptographic communication. It is used here to prevent replay attacks, where an attacker might try to re-send a previous request to gain unauthorized access.

Here is an example of how to retrieve a nonce from Moon using the MoonSDK class:

import { MoonSDK } from '@moonup/moon-sdk';

const sdk = new MoonSDK();

const nonce = await sdk.getSIWENonce(USER_ADDRESS_HERE);

Step 2: User Signs a Message

Once the nonce is fetched, the user is prompted to sign a message. This message includes the nonce and other details about the sign-in request, structured according to the SIWE format. This step is crucial for verifying the user's control over the Ethereum address without exposing any sensitive information like private keys.

Here is an example of how to have a user sign a message with the nonce using the signMessage function from @wagmi/core and the SiweMessage class from siwe:

import { signMessage } from '@wagmi/core';
import { SiweMessage } from 'siwe';

const message = new SiweMessage({
    domain: window.location.host,
    address: address,
    statement: 'Sign in with Ethereum to the app.',
    uri: window.location.origin,
    version: '1',
    chainId: 1,
    nonce: nonce,
});
const signedMessage = await signMessage({
    message: message.prepareMessage(),
});

How does this code prompt the user?

The above example uses the signMessage function to prompt the user to connect their wallet through their wallet connector (like MetaMask or Coinbase Wallet) and then have the user "sign the message" which logs them into the app!

Step 3: Verify the SIWE Signature

After obtaining the signed message, the next step is to verify the SIWE signature using the verifySIWESignature method from the MoonSDK class. This method takes the user's Ethereum address, the signed message, the nonce, and the message as parameters.

Here is an example of how to verify the SIWE signature using the MoonSDK class:

const siweResponse = await sdk.verifySIWESignature(userAddress, signedMessage, nonce, message);

Step 4: Handle Final Response from Moon’s Server

If a user has been successfully authorized, setting the access token on an active MoonSDK instance will finish authenticating the user!

if (siweResponse.ok) {
    // Verification was successful
    moon.setAccessToken(siweResponse.access_token, siweResponse.refresh_token);
    console.log('Verification successful!');
} else {
    // Verification failed
    console.error('Verification failed!');
}

Full code for example:

Put together, below is an entire code sample for how to authenticate a user using SIWE:

import { signMessage } from '@wagmi/core';
import { SiweMessage } from 'siwe';
import { MoonSDK } from '@moonup/moon-sdk';

const sdk = new MoonSDK();

const MoonSIWE = async (address) => {
    const userAddress = address ? address : '';

    try {
        // 1. Get a nonce from the server using MoonSDK
        const nonce = await sdk.getSIWENonce(userAddress);

        // 2. Ask the user to sign a message
        const message = new SiweMessage({
            domain: window.location.host,
            address: userAddress,
            statement: 'Sign in with Ethereum to the app.',
            uri: window.location.origin,
            version: '1',
            chainId: 1,
            nonce: nonce,
        });
        const signedMessage = await signMessage({
            message: message.prepareMessage(),
        });

        // 3. Verify the SIWE signature using MoonSDK
        const siweResponse = await sdk.verifySIWESignature(userAddress, signedMessage, nonce, message);

        // 4. Handle final response from Moon’s server
        if (siweResponse.ok) {
            // Verification was successful
            moon.setAccessToken(siweResponse.access_token, siweResponse.refresh_token);
            console.log('Verification successful!');
        } else {
            // Verification failed
            console.error('Verification failed!');
        }
    } catch (err) {
        console.error('An error occurred:', err);
    }
}

In this documentation page, the new methods getSIWENonce and verifySIWESignature from the MoonSDK class are used to handle the SIWE (Sign-In with Ethereum) flow. The getSIWENonce method retrieves a nonce from the server, and the verifySIWESignature method verifies the SIWE signature using the provided address, signed message, nonce, and message.

PreviousAPI KeyNextPasskey

Last updated 10 months ago