Skip to main content

NEAR Indexer

The NEAR Indexer is a micro-framework that delivers a stream of blocks recorded on the NEAR network. It is specifically designed to handle real-time events on the blockchain.


Rationale

As scaling dApps enter NEAR’s mainnet, an issue may arise: how do they quickly and efficiently access state from our deployed smart contracts, and cut out the cruft? Contracts may grow to have complex data structures and querying the network RPC may not be the optimal way to access state data. The NEAR Indexer Framework allows for streams to be captured and indexed in a customized manner. The typical use-case is for this data to make its way to a relational database. Seeing as this is custom per project, there is engineering work involved in using this framework.

With the NEAR Indexer, developers can perform both high-level data aggregation and low-level introspection of blockchain events.

note

Data Lake which is a source of data for NEAR Lake Framework is feeded by a running the NEAR Lake Indexer that is built on top of NEAR Indexer.


How It Works

The NEAR Indexer works by running a node that processes blocks as they are added to the blockchain. It provides a stream of these blocks, allowing developers to subscribe to and process them in real-time.

Learn how to run it following the tutorial.


Latency

Comparing to NEAR Lake Framework in terms of latency the NEAR Indexer is significantly faster as it reads data directly from the blockchain the same way as RPC nodes do.

info

The full comparison table you can find here.