Blockchain with JavaScript (ES6)

Actions


Add Data to Blockchain
 
Validate Blockchain
 
Manipulate Blockchain
 

Console


This ES6 Demo works with Google Chrome only.
But it's possible to transpile this module to ES5 for all browsers with Babel (e.g.)

This Project is available on Github

Github Repository Download Master

Blockchain-Javascript-ES6-module

A simple blockchain with javascript as Node.js Module. Use test.html to play around!

Usage

Save your Hash function in window.myHashFunction

initialize

Initialize the Blockchain.

window.myHashFunction = sha256(); /* your Hash function */
let blockchain = new Blockchain(); /* Blockchain extends Array. */

add Data (create new Block)

blockchain.addBlock('data');

check integrity

blockchain.isChainValid()
/* returns true or false */