Skip to main content
Simulates a Solana transaction and returns a breakdown of expected asset changes, security validation results, and optionally an estimated SOL fee — all before the transaction is sent to the network. Supports both legacy 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

Call simulateSolanaTransaction inside a button handler to preview the transaction before the user confirms:
Last modified on June 24, 2026