arweavedb
Read and write data to the Arweave Blockchain Database
Last updated a year ago by goldzeus .
GPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install arweavedb 
SYNC missed versions from official npm registry.

ArweaveDB

ArweaveDB is used to write and read the arweave blockchain database.

Known Vulnerabilities

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

// Add a block
await arweaveDB.addBlock(myBlock);

// Add a transaction
await arweaveDB.addTransaction(myTx);

// Get a block by ID
const block = await arweaveDB.getBlockById(blockId);

// Get a block by height
const block = await arweaveDB.getBlockByHeight(height);

Current Tags

  • 1.0.2                                ...           latest (a year ago)

3 Versions

  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |