ts-algochat
    Preparing search index...

    Interface IndexerClient

    Interface for interacting with an Algorand indexer.

    Implementations should wrap the algosdk Indexer client or equivalent.

    interface IndexerClient {
        getTransaction(txid: string): Promise<NoteTransaction>;
        searchTransactions(
            address: string,
            afterRound?: number,
            limit?: number,
        ): Promise<NoteTransaction[]>;
        searchTransactionsBetween(
            address1: string,
            address2: string,
            afterRound?: number,
            limit?: number,
        ): Promise<NoteTransaction[]>;
        searchTransactionsPaginated?(
            address: string,
            options?: { afterRound?: number; limit?: number; nextToken?: string },
        ): Promise<PaginatedTransactions>;
        waitForIndexer(
            txid: string,
            timeoutSecs?: number,
        ): Promise<NoteTransaction>;
    }
    Index

    Methods

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

      Parameters

      • address: string

        Address to search for

      • OptionalafterRound: number

        Only return transactions after this round

      • Optionallimit: number

        Maximum number of transactions to return

      Returns Promise<NoteTransaction[]>

    • Search for transactions between two addresses.

      Parameters

      • address1: string

        First address

      • address2: string

        Second address

      • OptionalafterRound: number

        Only return transactions after this round

      • Optionallimit: number

        Maximum number of transactions to return

      Returns Promise<NoteTransaction[]>

    • Search for transactions with cursor-based pagination.

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

      This method is optional. When not implemented, discovery functions fall back to searchTransactions with a single batch.

      Parameters

      • address: string

        Address to search for

      • Optionaloptions: { afterRound?: number; limit?: number; nextToken?: string }

        Pagination options

      Returns Promise<PaginatedTransactions>