Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Near Api to fetch all the transactions of an address till date or at any particular blockheight

Tags:

nearprotocol

I found a api "view_account" method using which i can fetch the balance of an address at a particular blockheight. Is there any Api or a way where i pass an address and it provides all the supporting transactions for the balance.

like image 461
Debasish22 Avatar asked Nov 01 '25 07:11

Debasish22


1 Answers

NEAR Protocol nodes do not store the data in that way, and it would be unrealistic to do so for all the use-cases out there, so the solution is to index the network block by block. There is an official Indexer Framework based on the official NEAR node implementation (nearcore), or you can use JSON RPC and build it yourself. There is an official Indexer for Explorer, which stores the data in PostgreSQL database (see the schema in the README), and we have a public shared read-only replica available for everyone out there to play with.

Flux implemented an indexer for their needs (also based on Indexer Framework): flux-capacitor

like image 116
Vlad Frolov Avatar answered Nov 03 '25 20:11

Vlad Frolov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!