NestJS background service for FiroBlocks — periodically syncs chain stats, UTXO data, and recent transactions from firod RPC into MongoDB. Runs independently of the API and owns all write operations to the shared database.
- Node.js 24
- MongoDB 8
- A fully synced firod node with the following indexes enabled in
firo.conf:
txindex=1
addressindex=1
spentindex=1
timestampindex=1
cp .env.example .env
yarn --frozen
yarn dev
| Variable |
Description |
FIRO_RPC_HOST |
firod RPC host |
FIRO_RPC_PORT |
firod RPC port |
FIRO_RPC_USER |
firod RPC username |
FIRO_RPC_PASS |
firod RPC password |
MONGO_URI |
MongoDB connection string |
| Job |
Interval |
Description |
syncChainStats |
30s |
Difficulty, best block hash, network hashrate |
warmRecentTransactions |
60s |
Caches recent transactions |
syncUtxoStats |
15m |
Block height, transaction count, total supply |
Community
Mozilla Public License 2.0