0.1.2 • Published 4 years ago

@vidhiigandhi/blockchainlibrary v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

BlockChain Library

A library that creates, mines, iterates blockchain using the provided database by the developer.

Installation

npm install @vidhiigandhi/blockchainlibrary

Usage

var Blockchain = require('@vidhiigandhi/blockchainLib');

const blockChain = new Blockchain();

blockChain.requirementsObj = {
  storageTypeInt: 0,
  storageCredentialObj: {
    user: 'root',
    password: 'xyz',
    host: 'localhost',
    port: '33060',
    dbName: 'blockchain',
    collectionName: 'blocks'
  }
};
blockChain.createGenesisBlock();
blockChain.addBlock('this is my new block');
blockChain.showBlocks({constriants: ['here', 16], limit: 2})
  .then((block) => {});
0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago