pub struct TransactionAdapter<'a> {
pub config: Option<ParseConfig>,
pub account_keys: Vec<String>,
pub spl_token_map: HashMap<String, TokenInfo>,
pub spl_decimals_map: HashMap<String, u8>,
/* private fields */
}Fields§
§config: Option<ParseConfig>§account_keys: Vec<String>§spl_token_map: HashMap<String, TokenInfo>§spl_decimals_map: HashMap<String, u8>Implementations§
Source§impl<'a> TransactionAdapter<'a>
impl<'a> TransactionAdapter<'a>
pub fn new(tx: &'a SolanaTransactionInput, config: Option<ParseConfig>) -> Self
pub fn slot(&self) -> u64
pub fn block_time(&self) -> i64
pub fn signature(&self) -> String
pub fn signer(&self) -> String
pub fn signers(&self) -> Vec<String>
pub fn fee(&self) -> TokenAmount
pub fn compute_units(&self) -> u64
pub fn tx_status(&self) -> TransactionStatus
pub fn instructions(&self) -> Vec<ParsedInstructionRef>
pub fn inner_instructions(&self) -> Option<&[InnerInstructionSet]>
pub fn raw_instructions(&self) -> &[RawInstruction]
pub fn raw_inner_instructions(&self) -> Option<&[InnerInstructionSet]>
pub fn get_instruction( &self, raw: &RawInstruction, program_id_index: u8, ) -> ParsedInstruction
pub fn get_instruction_program_id(&self, raw: &RawInstruction) -> String
pub fn get_account_key(&self, index: usize) -> Option<String>
pub fn get_account_index(&self, address: &str) -> Option<usize>
pub fn is_supported_token(&self, mint: &str) -> bool
pub fn get_token_decimals(&self, mint: &str) -> u8
pub fn get_pool_event_base( &self, pool_event_type: PoolEventType, program_id: &str, ) -> PoolEventBase
pub fn pre_balances(&self) -> Option<&[u64]>
pub fn post_balances(&self) -> Option<&[u64]>
pub fn pre_token_balances(&self) -> Option<&[TokenBalanceInput]>
pub fn post_token_balances(&self) -> Option<&[TokenBalanceInput]>
pub fn get_token_account_owner(&self, account_key: &str) -> Option<String>
pub fn get_token_account_balance( &self, account_keys: &[String], ) -> Vec<Option<TokenAmount>>
pub fn get_token_account_pre_balance( &self, account_keys: &[String], ) -> Vec<Option<TokenAmount>>
pub fn get_account_balance( &self, account_keys: &[String], ) -> Vec<Option<TokenAmount>>
pub fn get_account_pre_balance( &self, account_keys: &[String], ) -> Vec<Option<TokenAmount>>
pub fn get_account_sol_balance_changes( &self, _is_owner: bool, ) -> HashMap<String, BalanceChange>
pub fn get_account_token_balance_changes( &self, _is_owner: bool, ) -> HashMap<String, HashMap<String, BalanceChange>>
Auto Trait Implementations§
impl<'a> Freeze for TransactionAdapter<'a>
impl<'a> RefUnwindSafe for TransactionAdapter<'a>
impl<'a> Send for TransactionAdapter<'a>
impl<'a> Sync for TransactionAdapter<'a>
impl<'a> Unpin for TransactionAdapter<'a>
impl<'a> UnsafeUnpin for TransactionAdapter<'a>
impl<'a> UnwindSafe for TransactionAdapter<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more