Skip to main content
Class
class Wallet

Instance Properties

address

var address: String { get }

Instance Methods

approve(transactionId:)

func approve(transactionId id: String) async throws(TransactionError) -> Transaction

balance(of:)

func balance(of tokens: [CryptoCurrency] = []) async throws(WalletError) -> Balances

balances(::)

func balances(_ tokens: [CryptoCurrency] = [], _ chains: [Chain] = []) async throws(WalletError) -> Balance

fund(token:amount:)

func fund(token: CryptoCurrency, amount: Int) async throws(WalletError)

nfts(page:nftsPerPage:)

func nfts(page: Int, nftsPerPage: Int) async throws(WalletError) -> [NFT]

send(::_:idempotencyKey:)

Sends tokens to a recipient.
func send(_ walletLocator: String, _ tokenLocator: String, _ amount: Double, idempotencyKey: String? = nil) async throws(TransactionError) -> TransactionSummary
A TransactionSummary containing the transaction details

Parameters

  • walletLocator: The recipient wallet address
  • tokenLocator: Token identifier in format “:” (e.g., “base-sepolia:eth”, “solana:usdc”)
  • amount: The amount to send as a decimal number
  • idempotencyKey: Optional unique key to prevent duplicate transaction creation. If not provided, a random UUID will be generated.

send(token:recipient:amount:)

func send(token: CryptoCurrency, recipient: TransferTokenRecipient, amount: String) async throws(TransactionError) -> Transaction

transferToken(tokenId:recipient:amount:)

func transferToken(tokenId: String? = nil, recipient: TransferTokenRecipient, amount: String) async throws(TransactionError) -> Transaction