ArweaveDB
ArweaveDB is used to write and read the arweave blockchain database.
Arweave uses an unique way of storing it's data, and this package can be used on servers or any other application that interacts with the blockchain.
ArweaveDB uses fs
to write files and fast-glob
to find blocks by height or by ID.
Installation
npm install arweavedb --save
Initialisation
import { ArweaveDB } from 'arweavedb';
const arweaveDB = new ArweaveDB(__dirname);
Getting started
And enjoy
await arweaveDB.addBlock(myBlock);
await arweaveDB.addTransaction(myTx);
const block = await arweaveDB.getBlockById(blockId);
const block = await arweaveDB.getBlockByHeight(height);