Skip to main content

Class: SolanaIndexerClient

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

Implements​

  • OvercastIndexerClient

Constructors​

Constructor​

new SolanaIndexerClient(
connection,
programId,
domain): SolanaIndexerClient;

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

Parameters​

ParameterType
connectionConnection
programIdPublicKey
domainnumber

Returns​

SolanaIndexerClient

Properties​

connection​

readonly connection: Connection;

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


domain​

readonly domain: number;

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


programId​

readonly programId: PublicKey;

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

Methods​

getEvents()​

getEvents(
range,
cursor,
limit,
commitment): Promise<EventPage>;

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

One bounded page of events in the range (floor, ceil]. Pass cursor as null to start, then thread back EventPage until it is null (range drained). Returns at most limit events, oldest first. The adapter owns the scan direction and drops anything above ceil. commitment is the tier being indexed; an adapter may skip work only the finalized tier needs (e.g. an exact txIdx).

Parameters​

ParameterType
range{ ceil: Checkpoint; floor: Checkpoint | null; }
range.ceilCheckpoint
range.floorCheckpoint | null
cursorCheckpoint | null
limitnumber
commitmentCommitment

Returns​

Promise<EventPage>

Implementation of​

OvercastIndexerClient.getEvents

getFinality()​

getFinality(commitment): Finality;

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

Parameters​

ParameterType
commitmentCommitment

Returns​

Finality


getHead()​

getHead(commitment): Promise<Checkpoint>;

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

The current chain head at a Commitment level: live (fast, still reorgable) or finalized (settled, canonical). A sweep runs toward the head at its level as a ceiling.

Parameters​

ParameterType
commitmentCommitment

Returns​

Promise<Checkpoint>

Implementation of​

OvercastIndexerClient.getHead

watch()​

watch(onActivity): void;

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

Wakes on every transaction mentioning the program, via logsSubscribe on the connection's websocket. web3.js resubscribes after a reconnect.

Parameters​

ParameterType
onActivity() => void

Returns​

void

Implementation of​

OvercastIndexerClient.watch