1.0.1 • Published 4 years ago
mtree v1.0.1
Mtree
JavaScript implementation of Merkle Trees.
Usage
Install with NPM.
npm install mtree --save
Use in your project.
var MerkleTree = require('mtree');
var tree = new MerkleTree([/* input hashes */]);
tree.depth(); // returns the tree depth
tree.levels(); // return the number of levels in tree
tree.level(2); // returns the nodes at the given level
tree.root(); // returns the merkle root for the tree
tree.nodes(); // returns the number of nodes in the tree
Run the tests.
npm run testsuite
npm run linter
npm run coverage