Skip to main content

IndexerClient

Trait IndexerClient 

Source
pub trait IndexerClient: Send + Sync {
    // Required methods
    fn search_transactions<'life0, 'life1, 'async_trait>(
        &'life0 self,
        address: &'life1 str,
        after_round: Option<u64>,
        limit: Option<u32>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<NoteTransaction>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn search_transactions_between<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        address1: &'life1 str,
        address2: &'life2 str,
        after_round: Option<u64>,
        limit: Option<u32>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<NoteTransaction>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_transaction<'life0, 'life1, 'async_trait>(
        &'life0 self,
        txid: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<NoteTransaction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn wait_for_indexer<'life0, 'life1, 'async_trait>(
        &'life0 self,
        txid: &'life1 str,
        timeout_secs: u32,
    ) -> Pin<Box<dyn Future<Output = Result<NoteTransaction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn search_transactions_paginated<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        address: &'life1 str,
        limit: Option<u32>,
        next_token: Option<&'life2 str>,
    ) -> Pin<Box<dyn Future<Output = Result<PaginatedTransactions>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Expand description

Trait for interacting with an Algorand indexer.

Required Methods§

Source

fn search_transactions<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, after_round: Option<u64>, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<NoteTransaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Search for transactions with notes sent to/from an address.

Source

fn search_transactions_between<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, address1: &'life1 str, address2: &'life2 str, after_round: Option<u64>, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<NoteTransaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Search for transactions between two addresses.

Source

fn get_transaction<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<NoteTransaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a specific transaction by ID.

Source

fn wait_for_indexer<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 str, timeout_secs: u32, ) -> Pin<Box<dyn Future<Output = Result<NoteTransaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Wait for a transaction to be indexed.

Provided Methods§

Source

fn search_transactions_paginated<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, address: &'life1 str, limit: Option<u32>, next_token: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<PaginatedTransactions>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Search for transactions with cursor-based pagination.

Returns a page of transactions and an optional next_token for fetching the next page. Implementations should use the Algorand indexer’s native next-token pagination when available.

The default implementation falls back to search_transactions without pagination support (returns all results with no next_token).

Implementors§