Prepare Solana transaction
Prepares an unsigned Solana v0 message for the authenticated user’s embedded wallet to sign. Supports transfer, payment, yield.deposit, and yield.withdraw intents. Kamino is the only yield protocol supported today. The response messageBytes are base64-encoded Solana message bytes, not a serialized transaction; the wallet must sign the decoded bytes exactly and submit only the detached signature.
Authorizations
Cognito JWT token for regular user authentication
Body
Request body for preparing a Solana transaction. The authenticated user id is derived from the bearer token; clients do not send userId to Wallet Kit. The server builds and stores an unsigned Solana v0 message, then returns the exact bytes the embedded wallet must sign.
Request body for preparing a Solana transaction. The authenticated user id is derived from the bearer token; clients do not send userId to Wallet Kit. The server builds and stores an unsigned Solana v0 message, then returns the exact bytes the embedded wallet must sign.
Caller-supplied idempotency key for this prepare call. Repeating the same clientIntentId with an identical intent returns the existing prepared transaction while it is active. Reusing the same key with different intent details returns a conflict error.
1Version of the intent schema. Production prepare currently expects exactly 1.
1 1
Discriminated Solana transaction intent. Use transfer for wallet transfers, payment for Spritz off-ramp quote payments, yield.deposit for Kamino USDC vault deposits, and yield.withdraw for Kamino USDC vault withdrawals.
- Option 1
- Option 2
- Option 3
- Option 4
auto, sponsored_only, user_paid_only Response
Prepare response for the embedded-wallet signing flow. Decode messageBytes, sign those exact bytes with userSigner, then submit only the detached base64 signature. Do not submit a serialized transaction or rebuild the message client-side.
Prepare response for the embedded-wallet signing flow. Decode messageBytes, sign those exact bytes with userSigner, then submit only the detached base64 signature. Do not submit a serialized transaction or rebuild the message client-side.
Server-issued transaction id. Pass this back to the submit endpoint along with the user signature.
Base64-encoded Solana v0 message bytes. The embedded wallet must sign exactly these bytes after base64 decoding — do not mutate, rebuild, or wrap.
Format of messageBytes. solana_message_v0 means the bytes are a Solana v0 message, not a serialized transaction.
solana_message_v0 Solana public key that must produce userSignature over the decoded messageBytes.
"8sLbNZoA1cfnvMJLPfp98ZLAnFSYCFApfJKMbiXNLwxj"
All signer public keys required by the prepared message. The embedded wallet is responsible for the userSigner; Spritz may add the fee-payer signature during submit.
Solana public key paying the network fee for the prepared transaction.
Whether Spritz is expected to pay the Solana network fee for this prepared transaction.
Estimated Solana network fee in lamports for the prepared message.
x >= 05000
Address lookup table accounts used by the v0 message. Empty when the message does not use lookup tables.
Recent blockhash embedded in the prepared message. This blockhash is what makes the prepared message expire.
Last Solana block height at which the prepared message can still be submitted.
x >= 0ISO 8601 timestamp at which this prepared transaction expires. Solana blockhashes expire quickly; if submit fails with TX_EXPIRED, call prepare again and sign the new messageBytes.
Product summary of the prepared transaction. Shape varies by intent. Transfer summaries identify sender, recipient, mint, and amount. Payment summaries identify the off-ramp quote, destination, amount, mint, and required token input. Kamino yield summaries identify protocol, vault, mint, and the deposit amount or withdraw-all request.