@rei-network/blockchain
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

@rei-network/blockchain

NPM Version License

Definition of blockchain structure and rules, based on @ethereumjs/blockchain

INSTALL

npm install @rei-network/blockchain

USAGE

blockchain = new Blockchain({
  db: chaindb, // Database to store blocks and metadata. Should be an abstract-leveldown compliant store
  database: database,
  genesisBlock, // Messages of genesis block to initialize blockchain
});

await blockchain.putBlock(block);
console.log(blockchain.latestBlock);
console.log(blockchain.totalDifficulty);

License

GNU General Public License v3.0

Readme

Keywords

none

Package Sidebar

Install

npm i @rei-network/blockchain

Weekly Downloads

5

Version

3.0.2

License

GPL-3.0-or-later

Unpacked Size

192 kB

Total Files

12

Last publish

Collaborators

  • bijianing97
  • samlior_
  • lanhaoxiang