blockchain-testing

1.0.0 • Public • Published

blockchain-testing

This is a simple blockchain implementation in Node.js.

Installation

npm install blockchain-testing

Usage

const { Blockchain, Block } = require('blockchain-testing');

// Create a new blockchain
let myBlockchain = new Blockchain();

// Add a new block to the blockchain
let newDataBlock = new Block(Date.now(), { amount: 5 });
myBlockchain.addBlock(newDataBlock);

// Check if the blockchain is valid
console.log('Blockchain valid?', myBlockchain.isChainValid());

Readme

Keywords

Package Sidebar

Install

npm i blockchain-testing

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.87 kB

Total Files

4

Last publish

Collaborators

  • teondol22