Transaction and VersionedTransaction objects. Powered by
Blockaid for security validation.
Installation
Usage
Parameters
Returns
Promise<SolanaSimulationResult> — an object with the following fields:
When the transaction’s fee payer is different from the wallet address,
feeData.nativeAmount is 0n
— indicating the transaction fee is sponsored.Examples
SOL transfer
With fee estimation
Versioned transaction
Security validation
Error handling
React
CallsimulateSolanaTransaction inside a button handler to preview the transaction before the user confirms:
Related functions
- calculateSolanaTransactionFee - Fee estimation only, without asset diffs or security validation
- simulateEvmTransaction - Simulate an EVM transaction
- simulateZerodevUserOperation - Simulate a ZeroDev user operation
- signing-sending-transactions - Send Solana transactions
- svm-gas-sponsorship - Solana gas sponsorship