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
| Parameter | Type |
|---|---|
connection | Connection |
programId | PublicKey |
domain | number |
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
| Parameter | Type |
|---|---|
range | { ceil: Checkpoint; floor: Checkpoint | null; } |
range.ceil | Checkpoint |
range.floor | Checkpoint | null |
cursor | Checkpoint | null |
limit | number |
commitment | Commitment |
Returns
Promise<EventPage>
Implementation of
OvercastIndexerClient.getEvents
getFinality()
getFinality(commitment): Finality;
Defined in: solana-client/src/indexer.ts:89
Parameters
| Parameter | Type |
|---|---|
commitment | Commitment |
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
| Parameter | Type |
|---|---|
commitment | Commitment |
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
| Parameter | Type |
|---|---|
onActivity | () => void |
Returns
void
Implementation of
OvercastIndexerClient.watch