Prepare an Otto-attributed LI.FI swap
otto_prepare_swapPrepare, decode, and verify an unsigned same-chain EVM ERC20 swap construction aid for the caller-owned EOA or Safe. The envelope's valid_until bounds freshness and is committed to the artifact digest; the signer account nonce is the on-chain replay boundary, and this tool cannot guarantee single execution. Returns ordered allowance-reset, approval, and call steps only; never signs or submits. Every envelope from this server is valid for 300 seconds from construction (valid_until); a stale envelope is refused by the verifier — request a fresh one.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"accountProfile": "<accountProfile>",
"chainId": "<chainId>",
"fromToken": "<fromToken>",
"toToken": "<toToken>",
"fromAmount": "<fromAmount>",
"slippage": "<slippage>"
},
"name": "otto_prepare_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainId | Yes | ||
| toToken | Yes | ERC20 output token address; native-token routes are out of v1. | |
| slippage | Yes | ||
| fromToken | Yes | ERC20 input token address; native-token routes are out of v1. | |
| client_ref | No | ||
| fromAmount | Yes | Exact input amount in atomic token units. | |
| accountProfile | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rail | Yes | ||
| payload | Yes | ||
| operation | Yes | ||
| assertions | Yes | ||
| submission | Yes | ||
| artifact_id | Yes | ||
| valid_until | Yes | ||
| intent_digest | Yes | ||
| schema_version | Yes | ||
| account_binding | Yes | ||
| fee_attribution | Yes | ||
| replay_disclosure | Yes | ||
| required_capabilities | Yes |