Skip to content
docs

DecodedInstruction

Defined in: types.ts:49

One instruction of the preview. Undecoded instructions are never dropped: their raw accounts and data stay.

readonly accounts: readonly (RawAccount & object)[]

Defined in: types.ts:60


readonly args: Readonly<Record<string, PreviewValue>>

Defined in: types.ts:59


readonly data: string

Defined in: types.ts:62

The raw instruction data, base64.


readonly decoded: boolean

Defined in: types.ts:58

True when a decoder recognised the data.


readonly optional error?: string

Defined in: types.ts:66

Why a known program’s instruction did not decode (malformed data, too few accounts).


readonly index: number

Defined in: types.ts:51

Position in the transaction (top level), or in the parent’s inner list for an inner instruction.


readonly name: string | null

Defined in: types.ts:56

The instruction’s name, null when not decoded.


readonly optional parsedByRpc?: true

Defined in: types.ts:73

Set on an inner instruction the RPC returned already parsed (its jsonParsed form, raw bytes dropped): name and args are the RPC’s reading (type in PascalCase, info as is), not this package’s.


readonly optional partial?: string

Defined in: types.ts:68

The instruction is recognised but only partly decoded (a layout newer than the decoder): why. Arguments past that point are null.


readonly programAddress: string

Defined in: types.ts:52


readonly programName: string | null

Defined in: types.ts:54

The program’s name when a decoder for it is registered, null otherwise.


readonly optional via?: string

Defined in: types.ts:64

Set when the instruction runs through a proxy that invokes its first account (Mayan’s CPI proxy): the proxy’s address.