Input:
chainId: number
account: string
for_user: boolean
await sdk.executeTool("BalanceTool", { chainId: 1, account: "0xabc...", for_user: true });
Input:
address: string
chain: number
provider: string
await sdk.executeTool("DefiPositionsTool", {
address: "0xabc...",
chain: 42161,
provider: "aave",
});
Input:
chainId: number
provider: string
await sdk.executeTool("PoolTool", { chainId: 8453, provider: "uniswap" });
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"
await sdk.executeTool("ZapCallDataGeneratorTool", {
srcToken: "0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eB48",
srcChainId: 1,
srcDecimals: 6,
destToken: "0xC02aaa39b223FE8D0A0e5C4F27eAD9083C756Cc2",
destChainId: 1,
destDecimals: 18,
account: "0xabc...",
recipient: "0xabc...",
amount: "1000000",
decimalAmount: "1",
sessionId: "session-1",
type: "swap",
});
Input:
Behavior:
- Loads cached route
- Requests confirmation (when enabled)
- Handles approvals and sends transaction
- Waits for receipt and clears cached route
await sdk.executeTool("PerformZapTool", { sessionId: "session-1" });
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