This package has been deprecated

Author message:

This package is no longer maintained.

mtree

1.0.1 • Public • Published

Mtree

JavaScript implementation of Merkle Trees.

Build Status Coverage Status NPM

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

Package Sidebar

Install

npm i mtree

Weekly Downloads

7

Version

1.0.1

License

LGPL-3.0

Unpacked Size

16.9 kB

Total Files

9

Last publish

Collaborators

  • npm