execute_swap
Execute a token swap on Sera: get a quote, approve tokens if needed, sign and submit the transaction.
Instructions
Execute a swap transaction. Gets a quote, handles token approval if needed (sends on-chain approve tx for non-permit tokens like USDT), signs the EIP-712 intent, and submits. Requires WALLET_PRIVATE_KEY.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to swap (in token units, e.g., '100' for 100 tokens) | |
| to_token | Yes | Address of token to buy | |
| from_token | Yes | Address of token to sell |