Skip to content
docs

describeTransaction

describeTransaction(input, options?): Promise<TransactionPreview>

Defined in: describe.ts:24

What a transaction will do, before it is signed: every instruction decoded (lookup tables read through rpc when they were not passed), and — with an rpc — a simulation with the signer’s SOL and token balance changes and the inner instructions the programs would run. A failed simulation is reported, not thrown; only transport errors throw.

const preview = await describeTransaction(base64Tx, { rpc: createSolanaRpc(url), signer: wallet.address })

TransactionInput

DescribeOptions = {}

Promise<TransactionPreview>