addInstruction(options)
This allows for tracking program instructions. options has the following structure:
programId: the set of program addresses to track. Leave undefined to subscribe to instructions data of all programs from the whole network.d1throughd8: sets of 1, 2, 3, 4 and 8-byte instruction discriminators, correspondingly. Discriminators are0x-prefixed hexadecimal prefixes of instruction data; eachdNfilter requires exactly that many bytes.discriminator: a set of instruction data prefixes of any length,0x-prefixed hexadecimal.a0througha9: sets of base58-encoded account inputs to the instruction, at positions 0-9 correspondingly.isCommitted:trueto request only instructions that did not revert.
transaction = true: retrieve the transaction that gave rise to instructiontransactionBalances = true: retrieve all SOL balance records of the parent transactiontransactionTokenBalances = true: retrieve all token balance records of the parent transactiontransactionInstructions = true: retrieve all instructions executed by the parent transactionlogs = true: retrieve all logs emitted due to the instructioninnerInstructions = true: retrieve the data for all instruction calls due to the matching instruction
augmentBlock() from @subsquid/solana-objects on the block data to populate the convenience reference fields like instruction.inner.
Selection of the exact fields to be retrieved for each instruction item and the related data is done with the setFields() method documented on the Field selection page.