Build an unsigned Mayan swap transaction
build_swapConstruct unsigned Mayan cross-chain swap transactions. Returns quote terms, route, and required approvals for the caller to sign with their own wallet.
Instructions
Build the transaction for a Mayan cross-chain swap and return it UNSIGNED. This server holds no private keys and cannot sign or broadcast — the caller signs with their own wallet. Quote terms (minimum received, slippage, route, ETA) are returned alongside the payload so the signer can see what they are approving. EVM sources also return the ERC20 approval that must be sent first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Human-readable amount of the source token, as a decimal string. Example: "0.5". | |
| to_chain | Yes | Destination chain. | |
| to_token | Yes | Token symbol (resolved against Mayan's verified token list), an exact token address, or "native". | |
| from_chain | Yes | Source chain — the chain you are spending from. | |
| from_token | Yes | Token symbol (resolved against Mayan's verified token list), an exact token address, or "native". | |
| route_type | No | Pin a specific route from get_quote. Omitted, the best route is used. | |
| slippage_bps | No | Slippage tolerance in basis points (1 bp = 0.01%). Mayan caps this at 500 (5%). "auto" lets Mayan choose. | auto |
| swapper_address | Yes | Your address on the source chain. This is the address that will sign. | |
| destination_address | Yes | Recipient address on the destination chain. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| route | Yes | ||
| approval | No | ||
| chain_kind | Yes | ||
| custody_note | Yes | ||
| signer_count | Yes | Always 0. This server never emits secret material. | |
| verification | Yes | What was actually checked before this payload was released. A field present and false means the check ran and did not hold. A field that is absent means the check does not apply here: the forwarder cross-check reads an EVM call, so it is absent on Solana builds, which are instruction lists with no such envelope. | |
| evm_transaction | No | ||
| swapper_address | Yes | ||
| solana_transaction | No | ||
| destination_address | Yes |