NEAR Lake Framework
GitHub repo
Description
NEAR Lake Framework is an ecosystem of library companions to NEAR Lake. They allow you to build your own indexer that subscribes to the stream of blocks from the NEAR Lake data source and create your own logic to process the NEAR Protocol data in the programming languages of your choice (at the moment, there are implementations in Python, JavaScript, and Rust).
NEAR Lake Framework announcement
We have announced the release of NEAR Lake Framework on NEAR Gov forum
Please, read the post there
How does it compare to NEAR Indexer Framework?
Feature | Indexer Framework | Lake Framework |
---|---|---|
Allows to follow the blocks and transactions in the NEAR Protocol | Yes | Yes (but only mainnet and testnet networks) |
Decentralized | Yes | No (Pagoda Inc provides the data) |
Estimated cost of infrastructure | $500+/mo | $20/mo |
Ease of maintenance | Advanced (need to follow every nearcore upgrade, and sync state) | Easy (deploy once and forget) |
How long will it take to start? | days (on mainnet/testnet) | seconds |
Ease of local development | Advanced (localnet is a good option, but testing on testnet/mainnet is too heavy) | Easy (see tutorials) |
Programming languages that a custom indexer can be implemented with | Rust only | Any (currently, helper packages are released in Python, JavaScript, and Rust) |
What is the cost of running a custom indexer based on NEAR Lake?
Indexers that are based on NEAR Lake consume 100-500MB of RAM depending on the size of preloading queue, it does not require any storage, and it takes quite a bit of CPU power, so even Raspberry PI will do the job.
Getting the blockchain data from S3 will cost around $20 per month as NEAR Lake configured S3 buckets in such a way that the reader is paying the costs.
Examples & Tutorials
near-examples/near-lake-raw-printer
: simple example of a data printer built on top of NEAR Lake Frameworknear-examples/near-lake-accounts-watcher
: source code for a video tutorial on how to use the NEAR Lake Frameworknear-examples/indexer-tx-watcher-example-lake
indexer example that watches for transaction for specified accounts/contracts build on top of NEAR Lake Framework
Tutorials
See Tutorials page