blockchain-testing
v1.0.0
Published
Ready to use blockchain technology
Downloads
1
Readme
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());