Skip to content

christroutner/slp-indexer

Repository files navigation

slp-indexer

js-standard-style semantic-release

This is a prototype SLP indexer using LevelDB to store the data.

Current State of Development

The indexer currently indexes GENESIS and SEND transactions. These libraries are available in the src/adapters/indexer folder, and their are unit tests for all the libraries.

Next development steps would be:

  • Add indexing for MINT transactions.
  • Then the indexer simply needs to run until it runs into issues, and each new issue should lead to a cycle of refactoring and unit test writing.

Architecture

This indexer leverages bch-js, which in turn leverages the slp-parser, for the indexing. To run the indexer, you should have a fully-synced BCHN full node, and bch-api configured to talk to it.

The data is stored in four different LevelDB databases (indexes):

  • Address database - Tracks UTXOs, balances, and transaction history for each address.
  • Transaction database - Retains a copy of the hydrated transactions used in the indexing.
  • Token - Tracks stats on each token.
  • Status - Tracks the syncing status of the app.

As the app crawls each transaction in each block, it updates the above databases. This key-value lookup is much more performant than SLPDB.

About

A prototype for an SLP indexer

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages