A library for building complex MongoDB queries for the EOSIO blockchain. Version 0.9.0 provides helper functions to query account info, actions, blocks, and more from an EOSIO node's MongoDB database. It wraps the MongoDB aggregation pipeline with pre-built stages for common EOSIO data patterns. Compared to raw MongoDB queries, it abstracts the schema details and provides typed query helpers. The library ships TypeScript definitions. It is stable but rarely updated; the last release was several years ago. It targets Node.js and browser environments.
npm install eosio-mongodb-queriesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates connecting to a local MongoDB and fetching account data using the getAccount helper.
Enable plugin in nodeos config and replay with --replay-blockchain --hard-replay-blockchain --mongodb-wipe.
Ensure your EOSIO node version matches the schema expected by the library version.
Remove { useNewUrlParser: true } from MongoClient.connect for mongodb driver v4+.Provide a valid mongodb-uri in nodeos config, e.g., mongodb://user:pass@localhost:27017/EOS
Ensure you await MongoClient.connect and pass the returned connected client.