pub trait SolanaClientTrait {
// Required methods
fn get_transactions<'life0, 'async_trait>(
&'life0 self,
slot: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SolanaTransaction>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transaction<'life0, 'async_trait>(
&'life0 self,
signature: String,
) -> Pin<Box<dyn Future<Output = Result<Option<SolanaTransaction>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_signatures_for_address_with_info<'life0, 'async_trait>(
&'life0 self,
address: String,
limit: Option<usize>,
min_slot: Option<u64>,
until_signature: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SignatureInfo>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_all_signatures_for_address<'life0, 'async_trait>(
&'life0 self,
address: String,
start_slot: u64,
end_slot: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SignatureInfo>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transactions_for_addresses<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: &'life1 [String],
start_slot: u64,
end_slot: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SolanaTransaction>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_blocks_for_addresses<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: &'life1 [String],
start_slot: u64,
end_slot: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockType>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_account_info<'life0, 'async_trait>(
&'life0 self,
pubkey: String,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_program_accounts<'life0, 'async_trait>(
&'life0 self,
program_id: String,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Extended functionality specific to the Solana blockchain
Required Methods§
Sourcefn get_transactions<'life0, 'async_trait>(
&'life0 self,
slot: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SolanaTransaction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transactions<'life0, 'async_trait>(
&'life0 self,
slot: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SolanaTransaction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves transactions for a specific slot
Sourcefn get_transaction<'life0, 'async_trait>(
&'life0 self,
signature: String,
) -> Pin<Box<dyn Future<Output = Result<Option<SolanaTransaction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction<'life0, 'async_trait>(
&'life0 self,
signature: String,
) -> Pin<Box<dyn Future<Output = Result<Option<SolanaTransaction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves a single transaction by signature
Sourcefn get_signatures_for_address_with_info<'life0, 'async_trait>(
&'life0 self,
address: String,
limit: Option<usize>,
min_slot: Option<u64>,
until_signature: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SignatureInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_signatures_for_address_with_info<'life0, 'async_trait>(
&'life0 self,
address: String,
limit: Option<usize>,
min_slot: Option<u64>,
until_signature: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SignatureInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves signatures with full info (slot, err, block_time) for an address Optionally filter by slot range
Sourcefn get_all_signatures_for_address<'life0, 'async_trait>(
&'life0 self,
address: String,
start_slot: u64,
end_slot: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SignatureInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_signatures_for_address<'life0, 'async_trait>(
&'life0 self,
address: String,
start_slot: u64,
end_slot: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<SignatureInfo>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves all signatures for an address within a slot range with automatic pagination This method handles pagination internally and returns all signatures up to a safety limit
Sourcefn get_transactions_for_addresses<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: &'life1 [String],
start_slot: u64,
end_slot: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SolanaTransaction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_transactions_for_addresses<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: &'life1 [String],
start_slot: u64,
end_slot: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SolanaTransaction>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves transactions for multiple addresses within a slot range This is the optimized method that uses getSignaturesForAddress instead of getBlock
Sourcefn get_blocks_for_addresses<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: &'life1 [String],
start_slot: u64,
end_slot: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockType>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_blocks_for_addresses<'life0, 'life1, 'async_trait>(
&'life0 self,
addresses: &'life1 [String],
start_slot: u64,
end_slot: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockType>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves blocks containing only transactions relevant to the specified addresses This is the main optimization: instead of fetching all blocks, we fetch only transactions that involve the monitored addresses and group them into virtual blocks
Returns BlockType::Solana blocks, compatible with the existing filter infrastructure