Properties
| Property | Type | Description |
|---|---|---|
network | EvmSwapsNetwork | The network on which to perform the swap. |
fromToken | EvmAddress | The 0x-prefixed contract address of the token to sell. |
toToken | EvmAddress | The 0x-prefixed contract address of the token to buy. |
fromAmount | string | The amount of fromToken to sell, in atomic units. |
slippageBps? | number | Maximum slippage in basis points (100 = 1%). Default is 100. |
account? | EvmAddress | The taker account address. If omitted, auto-selected from the signed-in user’s accounts. |
useCdpPaymaster? | boolean | Whether to use the CDP Paymaster for gas sponsorship. Only applicable for smart accounts; ignored for EOA. Cannot be used together with paymasterUrl. |
paymasterUrl? | string | Custom paymaster URL for gas sponsorship. Only applicable for smart accounts; ignored for EOA. Cannot be used together with useCdpPaymaster. |
idempotencyKey? | string | Optional idempotency key for safe retries. |