Skip to main content

Class: SolanaIndexerClient

Defined in: solana-client/src/indexer.ts:91

Implements

  • OvercastIndexerClient

Constructors

Constructor

new SolanaIndexerClient(connection, programId?): SolanaIndexerClient;

Defined in: solana-client/src/indexer.ts:96

Parameters

ParameterType
connectionConnection
programIdPublicKey

Returns

SolanaIndexerClient

Properties

connection

readonly connection: Connection;

Defined in: solana-client/src/indexer.ts:92


programId

readonly programId: PublicKey;

Defined in: solana-client/src/indexer.ts:93

Methods

getEvents()

getEvents(
start,
end,
chunk): Promise<EventPage>;

Defined in: solana-client/src/indexer.ts:142

Searches backwards — from end (the newest point) down towards start (the oldest, normally genesis) — the direction chains like Solana page natively.

Parameters

ParameterTypeDescription
startCheckpoint | nullthe lower bound to stop at — the oldest point, normally genesis. null searches all the way down to genesis.
endCheckpointthe (exclusive) upper bound to page down from — the newest point. Its inner checkpoint hash being null means "start at the chain head" (the newest event is included); a concrete signature/block hash means "strictly older than this".
chunknumberthe maximum number of transactions to scan

Returns

Promise<EventPage>

an EventPage: the events found (newest-first) plus a cursor — the oldest checkpoint scanned — to pass back as end on the next call. Page until cursor is null to reach start.

Implementation of

OvercastIndexerClient.getEvents

getFinalizedCheckpoint()

getFinalizedCheckpoint(): Promise<Checkpoint>;

Defined in: solana-client/src/indexer.ts:123

The head at the chain's finality commitment — the newest checkpoint that is settled and can no longer be reorged away. Always at or behind getLatestCheckpoint. Drives the finalization loop, which re-sweeps the range up to this point so the store converges on the canonical chain even if the live tail folded a confirmed-but-later-dropped transaction (or missed one on a failed tick).

Returns

Promise<Checkpoint>

Implementation of

OvercastIndexerClient.getFinalizedCheckpoint

getLatestCheckpoint()

getLatestCheckpoint(): Promise<Checkpoint>;

Defined in: solana-client/src/indexer.ts:119

The current chain head at the live commitment (confirmed, latest slot, etc.) — a blockheight, slot or state_version, anything that identifies the current ledger state as a checkpoint. Drives the low-latency live tail.

Returns

Promise<Checkpoint>

Implementation of

OvercastIndexerClient.getLatestCheckpoint

getTransactionInfo()

getTransactionInfo(hash): Promise<ParsedTransactionWithMeta | null>;

Defined in: solana-client/src/indexer.ts:110

Parameters

ParameterTypeDescription
hashstringthe transaction hash

Returns

Promise<ParsedTransactionWithMeta | null>

the chain's parsed detail for the transaction, or null if not found

Implementation of

OvercastIndexerClient.getTransactionInfo