@gxchain2/blockchain
v0.0.2
Published
[](https://www.npmjs.org/package/@gxchain2/blockchain) 
Readme
@gxchain2/blockchain
Definition of blockchain structure and rules, based on @gxchain2-ethereumjs/blockchain
INSTALL
npm install @gxchain2/blockchainUSAGE
blockchain = new Blockchain({
db: chaindb, // Database to store blocks and metadata. Should be an abstract-leveldown compliant store
database: database,
genesisBlock, // Messages of genesis block to initialize blockchain
});
await blockchain.putBlock(block);
console.log(blockchain.latestBlock);
console.log(blockchain.totalDifficulty);