prepare_solana_swap
Builds an unsigned Jupiter-routed swap draft using a durable nonce. Returns a preview and handle for later signing and sending via preview_solana_send.
Instructions
Build an unsigned Jupiter-routed swap DRAFT. Takes the quote object returned by get_solana_swap_quote and calls Jupiter's /swap-instructions endpoint to get the deconstructed instruction list, then composes the final v0 tx: [nonceAdvance, ...computeBudget, ...setup, swap, cleanup?, ...other]. DURABLE NONCE REQUIRED — if the wallet hasn't run prepare_solana_nonce_init, this errors pointing to it. Uses v0 VersionedTransaction with Address Lookup Tables (Jupiter routes commonly exceed legacy-tx account limits). Returns a compact preview + opaque handle; NOT yet signable — when the user says 'send', call preview_solana_send(handle) to pin the current nonce value, then send_transaction. BLIND-SIGN REQUIRED on Ledger (Jupiter's program ID isn't in the Solana app's clear-sign registry), so the user must match the Message Hash on-device — surfaced in the CHECKS block emitted by preview_solana_send.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | Solana wallet executing the swap. Must have an initialized durable-nonce account — run prepare_solana_nonce_init first if not set up yet. | |
| quote | Yes | The full `quote` object returned by get_solana_swap_quote. Pass it back verbatim — Jupiter computes a signature over the quote and rejects /swap-instructions if any field is mutated. | |
| prioritizationFeeLamports | No | Optional priority fee in lamports. Omit to let Jupiter pick based on the local fee market (recommended). |