WalletSwapNamespace
Wallet swap namespace with full operations including signing. Provides getQuote() for pricing and execute() for swapping tokens.Methods
| Function | Description |
|---|---|
| getQuote() | Get a swap quote with the wallet address as recipient. Ensures calldata is encoded for the real wallet, not a placeholder. |
| getQuotes() | Get quotes from all providers with the wallet address as recipient. |
| getMarket() | Get a specific swap market by ID. |
| getMarkets() | Get available swap markets across all providers |
| supportedChainIds() | Get all supported chain IDs across all providers |
| execute() | Execute a token swap. Accepts either raw params (re-quotes internally) or a pre-built SwapQuote (skips re-quoting). |
getQuote()
Get a swap quote with the wallet address as recipient.
Ensures calldata is encoded for the real wallet, not a placeholder.
| Parameter | Type | Description |
|---|---|---|
params | SwapQuoteParams |
getQuotes()
Get quotes from all providers with the wallet address as recipient.
| Parameter | Type | Description |
|---|---|---|
params | SwapQuoteParams |
getMarket()
Get a specific swap market by ID.
| Parameter | Type | Description |
|---|---|---|
params | GetSwapMarketParams | Market identifier (poolId + chainId) |
provider | SwapProviderName | Optional provider name to query directly instead of searching all |
getMarkets()
Get available swap markets across all providers
| Parameter | Type | Description |
|---|---|---|
params | GetSwapMarketsParams | Optional filtering by chainId or asset |
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).
| Parameter | Type | Description | |
|---|---|---|---|
params | `WalletSwapParams | SwapQuote` | Swap parameters or a pre-built SwapQuote from getQuote() |