Skip to main content

WalletSwapNamespace

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

Methods

getQuote()

Get a swap quote with the wallet address as recipient. Ensures calldata is encoded for the real wallet, not a placeholder. Source ↗

getQuotes()

Get quotes from all providers with the wallet address as recipient. 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 ↗

supportedChainIds()

Get all supported chain IDs across all providers Source ↗

execute()

Execute a token swap. Accepts either raw params (re-quotes internally) or a pre-built SwapQuote (skips re-quoting). Returns: Swap receipt with transaction details Source ↗