prepare_solana_lifi_swap
Construct an unsigned LiFi swap or bridge from Solana. Supports in-chain swaps via Jupiter/Orca and cross-chain bridges to EVM chains. Returns Solana v0 tx for Ledger signing. Requires durable nonce.
Instructions
Build an unsigned LiFi-routed swap or bridge with Solana as the source chain. Returns a Solana v0 tx the user signs on Ledger. Two flows share this surface: (1) IN-CHAIN swap when toChain="solana" — LiFi internally routes through Jupiter / Orca / similar; consider prepare_solana_swap (Jupiter direct) as the more direct path for in-chain only. (2) CROSS-CHAIN bridge when toChain is an EVM chain — LiFi aggregates Wormhole, deBridge, Mayan, Allbridge. The Solana source tx confirms first; destination delivery happens after via the bridge protocol (typically 1-15 min). DURABLE NONCE REQUIRED. The builder rejects multi-tx routes (returned by some bridge variants) and multi-signer routes (which would need an ephemeral signer LiFi normally provides via its wallet adapter — Ledger-only signing can't supply it). Reverse direction (EVM → Solana) is not yet wired in this server; track as a follow-up. BLIND-SIGN on Ledger — match the Message Hash on-device after preview_solana_send.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | Solana base58 wallet — funds the swap and signs the source tx. Must have an initialized durable-nonce account (prepare_solana_nonce_init). | |
| fromMint | Yes | Source token: SPL mint address (base58) or the literal string "native" to swap SOL (LiFi maps "native" to wrapped-SOL internally; the wrap ix is built into the route). | |
| fromAmount | Yes | Raw integer amount in base units (NOT decimal-adjusted). Decimals are the source token's decimals — e.g. 1 USDC (6 decimals) = '1000000', 1 SOL (9 decimals) = '1000000000'. | |
| toChain | Yes | Destination chain. "solana" runs an in-chain swap (LiFi routes through Jupiter / Orca / similar — consider prepare_solana_swap for the more direct path). EVM chains run a cross-chain bridge. | |
| toToken | Yes | Destination token. SPL mint (base58) when toChain="solana"; 0x-prefixed EVM token address otherwise. "native" works on both (resolves to the chain's conventional native sentinel). | |
| toAddress | No | Optional destination wallet. Defaults to the source wallet for in-chain swaps. REQUIRED for cross-chain bridges since the Solana base58 source wallet won't be a valid EVM-chain recipient. | |
| slippageBps | No | Slippage tolerance in basis points (50 = 0.5%). Omit for LiFi's default (0.5%). Cross-chain bridges may impose their own minimums above this. |