chainparser 0.3.0

Parses Solana account data using provided IDL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use solana_sdk::pubkey::Pubkey;

mod discriminator;
mod instruction_mapper;

pub trait ParseableInstruction {
    fn program_id(&self) -> &Pubkey;
    fn accounts(&self) -> Vec<Pubkey>;
    fn data(&self) -> &[u8];
}

pub use instruction_mapper::{
    map_instruction, InstructionMapResult, InstructionMapper, BUILTIN_PROGRAMS,
};