pub trait Rpc:
Send
+ Sync
+ Debug
+ 'static {
Show 41 methods
// Required methods
fn new<'async_trait>(
config: LightClientConfig,
) -> Pin<Box<dyn Future<Output = Result<Self, RpcError>> + Send + 'async_trait>>
where Self: Sized + 'async_trait;
fn get_payer(&self) -> &Keypair;
fn get_url(&self) -> String;
fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_program_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
program_id: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Pubkey, Account)>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_program_accounts_with_discriminator<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
program_id: &'life1 Pubkey,
discriminator: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<(Pubkey, Account)>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn confirm_transaction<'life0, 'async_trait>(
&'life0 self,
signature: Signature,
) -> Pin<Box<dyn Future<Output = Result<bool, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_account<'life0, 'async_trait>(
&'life0 self,
address: Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_multiple_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: &'life1 [Pubkey],
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Account>>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_minimum_balance_for_rent_exemption<'life0, 'async_trait>(
&'life0 self,
data_len: usize,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn airdrop_lamports<'life0, 'life1, 'async_trait>(
&'life0 mut self,
to: &'life1 Pubkey,
lamports: u64,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
pubkey: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_latest_blockhash<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(Hash, u64), RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_slot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transaction_slot<'life0, 'life1, 'async_trait>(
&'life0 self,
signature: &'life1 Signature,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_signature_statuses<'life0, 'life1, 'async_trait>(
&'life0 self,
signatures: &'life1 [Signature],
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<TransactionStatus>>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn send_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
transaction: &'life1 Transaction,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn send_transaction_with_config<'life0, 'life1, 'async_trait>(
&'life0 self,
transaction: &'life1 Transaction,
config: RpcSendTransactionConfig,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn process_transaction<'life0, 'async_trait>(
&'life0 mut self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn process_transaction_with_context<'life0, 'async_trait>(
&'life0 mut self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = Result<(Signature, Slot), RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_and_send_transaction_with_event<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T>(
&'life0 mut self,
instructions: &'life1 [Instruction],
authority: &'life2 Pubkey,
signers: &'life3 [&'life4 Keypair],
) -> Pin<Box<dyn Future<Output = Result<Option<(T, Signature, Slot)>, RpcError>> + Send + 'async_trait>>
where T: BorshDeserialize + Send + Debug + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn create_and_send_versioned_transaction<'a, 'async_trait>(
&'a mut self,
instructions: &'a [Instruction],
payer: &'a Pubkey,
signers: &'a [&'a Keypair],
address_lookup_tables: &'a [AddressLookupTableAccount],
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
fn create_and_send_transaction_with_public_event<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
instruction: &'life1 [Instruction],
payer: &'life2 Pubkey,
signers: &'life3 [&'life4 Keypair],
) -> Pin<Box<dyn Future<Output = Result<Option<(PublicTransactionEvent, Signature, Slot)>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn create_and_send_transaction_with_batched_event<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
instruction: &'life1 [Instruction],
payer: &'life2 Pubkey,
signers: &'life3 [&'life4 Keypair],
) -> Pin<Box<dyn Future<Output = Result<Option<(Vec<BatchPublicTransactionEvent>, Signature, Slot)>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn indexer(&self) -> Result<&impl Indexer, RpcError>;
fn indexer_mut(&mut self) -> Result<&mut impl Indexer, RpcError>;
fn get_latest_active_state_trees<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<TreeInfo>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_state_tree_infos(&self) -> Vec<TreeInfo>;
fn get_random_state_tree_info(&self) -> Result<TreeInfo, RpcError>;
fn get_random_state_tree_info_v1(&self) -> Result<TreeInfo, RpcError>;
fn get_address_tree_v1(&self) -> TreeInfo;
fn get_address_tree_v2(&self) -> TreeInfo;
fn get_account_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<AccountInterface>>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_token_account_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<TokenAccountInterface>>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_associated_token_account_interface<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
owner: &'life1 Pubkey,
mint: &'life2 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<TokenAccountInterface>>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_multiple_account_interfaces<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: Vec<&'life1 Pubkey>,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<Option<AccountInterface>>>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_mint_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<MintInterface>>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn should_retry(&self, error: &RpcError) -> bool { ... }
fn get_anchor_account<'life0, 'life1, 'async_trait, T>(
&'life0 self,
pubkey: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, RpcError>> + Send + 'async_trait>>
where T: 'async_trait + BorshDeserialize,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn create_and_send_transaction<'a, 'async_trait>(
&'a mut self,
instructions: &'a [Instruction],
payer: &'a Pubkey,
signers: &'a [&'a Keypair],
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait { ... }
fn fetch_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
accounts: &'life1 [AccountToFetch],
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AccountInterface>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Required Methods§
fn new<'async_trait>(
config: LightClientConfig,
) -> Pin<Box<dyn Future<Output = Result<Self, RpcError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
fn get_payer(&self) -> &Keypair
fn get_url(&self) -> String
fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_program_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
program_id: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Pubkey, Account)>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_program_accounts_with_discriminator<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
program_id: &'life1 Pubkey,
discriminator: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<(Pubkey, Account)>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn confirm_transaction<'life0, 'async_trait>(
&'life0 self,
signature: Signature,
) -> Pin<Box<dyn Future<Output = Result<bool, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn get_account<'life0, 'async_trait>(
&'life0 self,
address: Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account<'life0, 'async_trait>(
&'life0 self,
address: Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns an account struct.
Sourcefn get_multiple_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: &'life1 [Pubkey],
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Account>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_multiple_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: &'life1 [Pubkey],
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Account>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns multiple account structs.
fn get_minimum_balance_for_rent_exemption<'life0, 'async_trait>(
&'life0 self,
data_len: usize,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn airdrop_lamports<'life0, 'life1, 'async_trait>(
&'life0 mut self,
to: &'life1 Pubkey,
lamports: u64,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
pubkey: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_latest_blockhash<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(Hash, u64), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_slot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_slot<'life0, 'life1, 'async_trait>(
&'life0 self,
signature: &'life1 Signature,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_signature_statuses<'life0, 'life1, 'async_trait>(
&'life0 self,
signatures: &'life1 [Signature],
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<TransactionStatus>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
transaction: &'life1 Transaction,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_transaction_with_config<'life0, 'life1, 'async_trait>(
&'life0 self,
transaction: &'life1 Transaction,
config: RpcSendTransactionConfig,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_transaction<'life0, 'async_trait>(
&'life0 mut self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_transaction_with_context<'life0, 'async_trait>(
&'life0 mut self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = Result<(Signature, Slot), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_and_send_transaction_with_event<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T>(
&'life0 mut self,
instructions: &'life1 [Instruction],
authority: &'life2 Pubkey,
signers: &'life3 [&'life4 Keypair],
) -> Pin<Box<dyn Future<Output = Result<Option<(T, Signature, Slot)>, RpcError>> + Send + 'async_trait>>where
T: BorshDeserialize + Send + Debug + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn create_and_send_versioned_transaction<'a, 'async_trait>(
&'a mut self,
instructions: &'a [Instruction],
payer: &'a Pubkey,
signers: &'a [&'a Keypair],
address_lookup_tables: &'a [AddressLookupTableAccount],
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn create_and_send_transaction_with_public_event<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
instruction: &'life1 [Instruction],
payer: &'life2 Pubkey,
signers: &'life3 [&'life4 Keypair],
) -> Pin<Box<dyn Future<Output = Result<Option<(PublicTransactionEvent, Signature, Slot)>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn create_and_send_transaction_with_batched_event<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
instruction: &'life1 [Instruction],
payer: &'life2 Pubkey,
signers: &'life3 [&'life4 Keypair],
) -> Pin<Box<dyn Future<Output = Result<Option<(Vec<BatchPublicTransactionEvent>, Signature, Slot)>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn indexer(&self) -> Result<&impl Indexer, RpcError>
fn indexer_mut(&mut self) -> Result<&mut impl Indexer, RpcError>
Sourcefn get_latest_active_state_trees<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<TreeInfo>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_active_state_trees<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<TreeInfo>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch the latest state tree addresses from the cluster.
Sourcefn get_state_tree_infos(&self) -> Vec<TreeInfo>
fn get_state_tree_infos(&self) -> Vec<TreeInfo>
Gets state tree infos. State trees are cached and have to be fetched or set.
Sourcefn get_random_state_tree_info(&self) -> Result<TreeInfo, RpcError>
fn get_random_state_tree_info(&self) -> Result<TreeInfo, RpcError>
Gets a random state tree info. State trees are cached and have to be fetched or set. Returns v1 state trees by default, v2 state trees when v2 feature is enabled.
Sourcefn get_random_state_tree_info_v1(&self) -> Result<TreeInfo, RpcError>
fn get_random_state_tree_info_v1(&self) -> Result<TreeInfo, RpcError>
Gets a random v1 state tree info. State trees are cached and have to be fetched or set.
fn get_address_tree_v1(&self) -> TreeInfo
fn get_address_tree_v2(&self) -> TreeInfo
Sourcefn get_account_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<AccountInterface>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_account_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<AccountInterface>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get account data from either on-chain or compressed sources.
Looks up by on-chain Solana pubkey. For cold accounts, searches by onchain_pubkey stored in the compressed account data.
Sourcefn get_token_account_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<TokenAccountInterface>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_token_account_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<TokenAccountInterface>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get token account data from either on-chain or compressed sources.
Sourcefn get_associated_token_account_interface<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
owner: &'life1 Pubkey,
mint: &'life2 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<TokenAccountInterface>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_associated_token_account_interface<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
owner: &'life1 Pubkey,
mint: &'life2 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<TokenAccountInterface>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get ATA data from either on-chain or compressed sources.
Sourcefn get_multiple_account_interfaces<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: Vec<&'life1 Pubkey>,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<Option<AccountInterface>>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_multiple_account_interfaces<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: Vec<&'life1 Pubkey>,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<Option<AccountInterface>>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get multiple account interfaces in a batch.
Sourcefn get_mint_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<MintInterface>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_mint_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Pubkey,
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Response<Option<MintInterface>>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get mint interface from either on-chain or compressed sources.
This method:
- First checks if the mint exists on-chain (hot)
- Falls back to compressed account lookup (cold) using derived address
- Parses mint data locally from the account data
Provided Methods§
fn should_retry(&self, error: &RpcError) -> bool
Sourcefn get_anchor_account<'life0, 'life1, 'async_trait, T>(
&'life0 self,
pubkey: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, RpcError>> + Send + 'async_trait>>where
T: 'async_trait + BorshDeserialize,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_anchor_account<'life0, 'life1, 'async_trait, T>(
&'life0 self,
pubkey: &'life1 Pubkey,
) -> Pin<Box<dyn Future<Output = Result<Option<T>, RpcError>> + Send + 'async_trait>>where
T: 'async_trait + BorshDeserialize,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns an a borsh deserialized account. Deserialization skips the discriminator.
fn create_and_send_transaction<'a, 'async_trait>(
&'a mut self,
instructions: &'a [Instruction],
payer: &'a Pubkey,
signers: &'a [&'a Keypair],
) -> Pin<Box<dyn Future<Output = Result<Signature, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Sourcefn fetch_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
accounts: &'life1 [AccountToFetch],
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AccountInterface>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_accounts<'life0, 'life1, 'async_trait>(
&'life0 self,
accounts: &'life1 [AccountToFetch],
config: Option<IndexerRpcConfig>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AccountInterface>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch multiple accounts using AccountToFetch descriptors.
Routes each account to the correct method based on its variant:
Pda->get_account_interfaceToken->get_token_account_interfaceAta->get_associated_token_account_interfaceMint->get_mint_interface
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.