Underlying better-sqlite3 handle for advanced queries.
OHLCV candles for token at interval, built from indexed swaps on its
primary pool (or options.pool). Prices are token-denominated in the
pool's quote asset. Sparse by default; pass fill: true to forward-fill gaps.
Close the database.
Number of holders with a positive balance (see Indexer.holders accuracy note).
Current holders of token, computed as net (inbound − outbound) transfer
flow per address. Accurate against the on-chain holder set only when the
token was synced from its first transfer (sync({ fromBlock: 0n })).
The zero address is excluded.
Discover and persist the Uniswap v3 pools for each indexed token. Called by createIndexer.
The most-traded indexed pool for token, or null if none indexed.
Row counts for a quick health check.
Sync all tokens from their last synced block to the head (incremental).
Pass fromBlock on the first run to backfill history — required for
holder counts to match the full-history on-chain state.
OptionalfromBlock?: bigintOptionalonProgress?: (p: SyncProgress) => voidOptionalswapFromBlock?: bigintIndependent backfill start for swaps (defaults to fromBlock). Lets you pull full holder history without re-scanning a memecoin's entire swap history for candles.
OptionaltoBlock?: bigintRolling 24-hour token-denominated swap volume across all indexed pools of
token. Uses cached block timestamps; now overridable for testing.
A local, incremental SQLite indexer for Robinhood Chain. Syncs
Transferand Uniswap v3Swapevents for a token set, resumes from the last synced block, and answers holder / OHLCV / volume queries from local data with no RPC.Requires the optional
better-sqlite3peer dependency; construct via createIndexer.