README
Doxie Chain
A lightweight Blockchain built in JS
Usage
To add to a dependency to your project:
npm install doxie-chain --save
Import/Require It
import { Block, Blockchain } from doxie-chain
or
const { Block, Blockchain } = require('doxie-chain');
Now Creating a Chain
const blockchain = new Blockchain();
blockchain.addBlock(new Block('Bear'))
blockchain.addBlock(new Block('Walter'))
blockchain.addBlock(new Block('Wrigley))
Block contains the properties:
const block = new Block('Batman')
block.hash = //SHA256 hash of ${block.previouHash}