Struct solana_sdk::message::AccountKeys
source · pub struct AccountKeys<'a> { /* private fields */ }
Expand description
Collection of static and dynamically loaded keys used to load accounts during transaction processing.
Implementations§
source§impl<'a> AccountKeys<'a>
impl<'a> AccountKeys<'a>
pub fn new(
static_keys: &'a [Pubkey],
dynamic_keys: Option<&'a LoadedAddresses>
) -> AccountKeys<'a>
sourcepub fn get(&self, index: usize) -> Option<&'a Pubkey>
pub fn get(&self, index: usize) -> Option<&'a Pubkey>
Returns the address of the account at the specified index of the list of message account keys constructed from static keys, followed by dynamically loaded writable addresses, and lastly the list of dynamically loaded readonly addresses.
sourcepub fn iter(&self) -> impl Iterator<Item = &'a Pubkey>
pub fn iter(&self) -> impl Iterator<Item = &'a Pubkey>
Iterator for the addresses of the loaded accounts for a message
sourcepub fn compile_instructions(
&self,
instructions: &[Instruction]
) -> Vec<CompiledInstruction, Global> ⓘ
pub fn compile_instructions(
&self,
instructions: &[Instruction]
) -> Vec<CompiledInstruction, Global> ⓘ
Compile instructions using the order of account keys to determine compiled instruction account indexes.