ETHnodeJS/blockchain/index.js

19 lines
421 B
JavaScript

/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/javascript.js to edit this template
*/
const Block = require("./block");
class Blockchain {
constructor() {
this.chain = [Block.genesis()];
}
}
const blockchain = new Blockchain();
console.log(JSON.stringify(blockchain));