Input:
chainId: number
account: string
for_user: boolean
Input:
address: string
chain: number
provider: string
Input:
chainId: number
provider: string
Generates and caches route/calldata in session scope.
Required fields include:
- source and destination token/chain/decimals
account, recipient
amount, decimalAmount
sessionId
type: "swap" | "bridge" | "zap"
Input:
Behavior:
- Loads cached route
- Requests confirmation (when enabled)
- Handles approvals and sends transaction
- Waits for receipt and clears cached route
Chain-change helpers
Queues chain-switch request context:
chainID: number
sessionId: string
Waits for user confirmation (up to 120 seconds), then resolves via confirmChainChange or POST /zap/chain/:sessionId.
UI trigger tool that expects strict tokens: TokenEntry[] payload. Last modified on May 26, 2026