walkInstructions
Returns every instruction in a confirmed transaction as TracedInstructions, in the order an explorer displays them: each outer instruction followed immediately by the inner instructions its CPIs produced.
Each returned instruction has its account indices resolved to
AccountMetas and its data exposed as a ReadonlyUint8Array
(omitted when empty), making it directly usable with the auto-generated
@solana-program/* identifyXInstruction and parseXInstruction
functions, and with isInstructionForProgram from @solana/instructions.
If meta is omitted, only outer instructions are returned. If
loadedAddresses is omitted, only static accounts are used to resolve
indices — pass meta?.loadedAddresses for v0 transactions that load
accounts from address lookup tables.
Parameters
| Parameter | Type |
|---|---|
args | { compiledMessage: CompiledTransactionMessage; loadedAddresses?: | Readonly<{ readonly: readonly Address[]; writable: readonly Address[]; }> | null; meta?: | Readonly<{ innerInstructions?: | readonly Readonly<{ index: number; instructions: readonly TransactionInstruction[]; }>[] | null; }> | null; } |
args.compiledMessage | CompiledTransactionMessage |
args.loadedAddresses? | | Readonly<{ readonly: readonly Address[]; writable: readonly Address[]; }> | null |
args.meta? | | Readonly<{ innerInstructions?: | readonly Readonly<{ index: number; instructions: readonly TransactionInstruction[]; }>[] | null; }> | null |