Documentation Index
Fetch the complete documentation index at: https://anypay-trails-api-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Withdraw mode provides a guided flow for moving assets out of a wallet while keeping fee options and routing handled by Trails. Users can choose the amount to withdraw and the destination token/chain, or you can pre-configure those selections. Trade Types: Supports bothEXACT_INPUT and EXACT_OUTPUT trade types.
Configuration
Required Props
| Prop | Type | Description |
|---|---|---|
mode | "withdraw" | Sets the widget to withdraw mode |
Optional Props
| Prop | Type | Description |
|---|---|---|
fromChainId | number | Pre-select origin chain |
fromToken | string | Pre-select origin token |
fromAccount | string | Pre-select a connected wallet if multiple wallets are connected |
toChainId | number | Controlled destination chain (locks selection) |
toToken | string | Controlled destination token (locks selection) |
defaultToChainId | number | Default destination chain (user can change) |
defaultToToken | string | Default destination token (user can change) |
toAddress | string | Recipient address (defaults to connected account if omitted) |
toAmount | string | Exact output amount for withdrawals |
Widget Implementation
Basic Withdraw Widget
Minimal configuration - users select everything:Pre-configured Withdraw
Pre-select origin and destination details:Recipient inputs accept
.eth ENS names in the widget UI and resolve them automatically.