Crates.io | inindexer |
lib.rs | inindexer |
version | 1.2.0 |
source | src |
created_at | 2024-05-03 15:42:32.791743 |
updated_at | 2024-12-12 07:53:36.645353 |
description | A framework for building NEAR Protocol indexers |
homepage | |
repository | https://github.com/INTEARnear/inindexer |
max_upload_size | |
id | 1228927 |
size | 209,126 |
InIndexer is a NEAR indexer framework.
MessageStreamer
or message_provider::MessageProvider
trait.Indexer
trait and handle receipts, blocks,
transactions, or transactions with all receipts included, at a cost of some preprocessing overhead (around 1-2ms
in release mode with 80-100 TPS on Slime's PC, this can be disabled in IndexerOptions::preprocess_transactions
).near_utils
.neardata
: Neardata data sourcelake
: NEAR Lake data sourceThis crate only works with tokio runtime.
If you want to see some examples, check minimal examples in examples/ or real indexers used in Intear infrastructure (nft-indexer, potlock-indexer, trade-indexer, new-token-indexer, intear-oracle indexer). By the way, some of these repositories are libraries, so if you want the same functionality but with a different event handler, you can use them in your code by specifying them as git dependencies.
To run multiple indexers at once without making a new request for each indexer, use MultiIndexer
, with MapErrorIndexer
if your indexers have different error types.
If you use neardata, you can enable optimistic block retrieval if you don't care about finality and need to minimize latency, just call .optimistic()
on the data provider.