Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

merkletreejs

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merkletreejs - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

dist/index.d.ts

@@ -80,2 +80,3 @@ interface Options {

getRoot(): any;
getHexRoot(): string;
/**

@@ -102,2 +103,3 @@ * getProof

getProof(leaf: any, index?: any): any[];
getHexProof(leaf: any, index?: any): string[];
/**

@@ -104,0 +106,0 @@ * verify

@@ -138,2 +138,6 @@ "use strict";

};
// TODO: documentation
MerkleTree.prototype.getHexRoot = function () {
return bufferToHex(this.getRoot());
};
/**

@@ -208,2 +212,6 @@ * getProof

};
// TODO: documentation
MerkleTree.prototype.getHexProof = function (leaf, index) {
return this.getProof(leaf, index).map(function (x) { return bufferToHex(x.data); });
};
/**

@@ -314,2 +322,5 @@ * verify

exports.MerkleTree = MerkleTree;
function bufferToHex(value) {
return '0x' + value.toString('hex');
}
function bufferify(x) {

@@ -316,0 +327,0 @@ if (!Buffer.isBuffer(x)) {

@@ -179,2 +179,7 @@ import * as reverse from 'buffer-reverse'

// TODO: documentation
getHexRoot() {
return bufferToHex(this.getRoot())
}
/**

@@ -263,2 +268,7 @@ * getProof

// TODO: documentation
getHexProof(leaf, index?) {
return this.getProof(leaf, index).map(x => bufferToHex(x.data))
}
/**

@@ -380,2 +390,6 @@ * verify

function bufferToHex(value:Buffer) {
return '0x'+value.toString('hex')
}
function bufferify(x) {

@@ -382,0 +396,0 @@ if (!Buffer.isBuffer(x)) {

2

package.json
{
"name": "merkletreejs",
"version": "0.1.2",
"version": "0.1.3",
"description": "Construct Merkle Trees and verify proofs",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc