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

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 & 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 auto-fills

When you submit a transaction via solSendTransaction, Turnkey automatically manages:
  • Recent blockhash: fetched and set at broadcast time to ensure validity
  • Compute unit limit: estimated and set to avoid failed transactions
  • Priority fee: set to ensure timely inclusion under current network conditions

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 fee paid by the sender’s wallet. Turnkey still manages blockhash, compute units, priority fees, broadcast, and status monitoring — you just don’t get fee abstraction.

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/with-solana. If you want to see @turnkey/wallet-stamper in action, head to examples/with-wallet-stamper.