Skip to main content

Address derivation

Turnkey supports Solana address derivation with ADDRESS_TYPE_SOLANA. Solana addresses are a simple encoding of the ed25519 public key.

Transaction construction and signing

Turnkey supports legacy, V0, and V1 transactions. See Solana transactions to choose a version and prepare your payload. To construct and sign a Solana transaction we offer a @turnkey/solana NPM package. It offers a TurnkeySigner which integrates our remote signer with the official Solana web3js library.

Transaction management and gas sponsorship

Turnkey’s Transaction Management handles the full lifecycle of Solana transactions — construction, broadcast, and status monitoring — down to a few API calls.

What Turnkey manages

Turnkey can fill a missing blockhash for non-sponsored sends and selects the blockhash for sponsored sends. See Blockhash selection and expiration for supplied values, approval timing, and retries. For sponsored legacy/V0 sends, Turnkey preserves explicit compute unit limits and prices in Compute Budget instructions and fills missing values. V1 uses outer transaction config instead. See Solana transactions for config behavior and policy migration. Turnkey broadcasts the transaction and monitors its status for both sponsored and non-sponsored sends.

Gas sponsorship (fee abstraction)

Set sponsor: true to enable fee sponsorship — your users never need to hold SOL to pay transaction fees. Turnkey covers fees on your behalf and passes costs through as a monthly line item. Supported networks:
  • Solana mainnet
  • Solana devnet (for testing)
To enable gas sponsorship, ensure it is activated in your Turnkey dashboard before setting sponsor: true.
For sponsored Solana flows, especially when you accept prebuilt transactions, see Solana transaction construction for sponsored flows for the current payload constraints and account-creation caveats.

Solana rent sponsorship

Solana rent sponsorship is separate from general gas sponsorship and is disabled by default. If an instruction creates a new account and the user signer is the payer, Turnkey pre-funds that signer for the rent-exempt amount only after you enable Sponsor Solana Rent in the dashboard and save the configuration. If those accounts are later closed, the refunded rent follows Solana account rules and can go back to the signer rather than the sponsor. See Solana Rent Sponsorship for setup steps, the dashboard flow, and mitigation guidance.

Non-sponsored transactions

Set sponsor: false to have the transaction’s fee payer pay the network fees. Turnkey preserves the submitted instructions and compute and fee controls, and can fill a missing blockhash before policy evaluation. See Non-sponsored sends for the blockhash rules.

Transaction status

After broadcast, Turnkey monitors your transaction until it is confirmed or fails. Query status via the Get Send Transaction Status endpoint. For a full walkthrough, see Sending Sponsored Solana Transactions.

Transaction parsing, policies, and signing

Turnkey has built a Solana parser which runs in a secure enclave, to parse unsigned transactions and extract metadata. Solana transactions are a list of instructions. We offer details about program keys, accounts, signers, and more. See the SolanaTransaction struct in our policy language page for a full list. As a bonus, Turnkey also takes care of combining the signature with the original payload if you use the SIGN_TRANSACTION activity types: the input is the unsigned payload, and the output is the signed Solana transaction, ready to be broadcast onchain.

Solana IDLs

You can use Solana IDLs in conjunction with our policy engine to secure users’ transactions. See the guide for more details.

Import and export formats

Turnkey offers wallet or private key imports and export functionality. To be compatible with the Solana ecosystem, we support imports in mnemonics form (for wallet seeds, this is most common) or in base58 format (for single private key import or export). See the import and export guides for more details.

Wallet signer

Did you know? Turnkey activities can be signed with an API key, a passkey…or a Solana wallet if you use our @turnkey/wallet-stamper package!

Examples and demos

You can find an example of Solana transaction construction and broadcasting using @turnkey/with-solana in examples/chain-integrations/with-solana. If you want to see @turnkey/wallet-stamper in action, head to examples/authentication/with-wallet-stamper.