solana_central/types/instruction.rs
1use solana_sdk::pubkey::Pubkey;
2
3/**
4A general independent Solana instruction type agnostic of inner or top level instructions. Designed
5to conveniently work with the format used in Solana SDKs and yellowstone grpc. Does not own any of
6the data just lifetimes to it.
7*/
8#[derive(Debug)]
9pub struct Instruction<'a> {
10 /// The ordered list of account keys of the tx that this instruction belongs to
11 pub tx_account_keys: &'a [Pubkey],
12 /// The ordered list of account indices of the accounts this instruction interacts with
13 pub accounts: &'a [u8],
14 /// The raw data of the instruction
15 pub data: &'a [u8],
16 /// The index of the program id in the tx_account_keys vector
17 pub program_id_index: u8,
18}