Skip to main content

WalletSwapNamespace

Wallet swap namespace with full operations including signing. Provides getQuote() for pricing and execute() for swapping tokens.

Methods

supportedChainIds()

Union of chain IDs supported by any configured provider. Source ↗

getQuote()

Get a swap quote bound to the wallet as executor. Defaults the output recipient to the wallet address when omitted. Source ↗

getQuotes()

Get quotes from all providers bound to the wallet as executor. Source ↗

getMarket()

Get a specific swap market by ID. Returns: Market information Source ↗

getMarkets()

Get available swap markets across all providers Returns: Promise resolving to array of markets from all providers Source ↗

execute()

Execute a token swap. Accepts either raw params (re-quotes internally) or a pre-built SwapQuote (skips re-quoting). When a pre-built quote is passed, its wallet address must equal this wallet’s address so approvals are checked against the account that will execute the swap. Re-quote via wallet.swap.getQuote(...) to bind the quote to this wallet. Returns: Swap receipt with transaction details Source ↗