New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@accumulators/merkle-mountain-range

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@accumulators/merkle-mountain-range - npm Package Compare versions

Comparing version 3.0.3 to 3.0.7

2

lib/core.d.ts

@@ -14,4 +14,6 @@ import { AppendResult, PeaksFormattingOptions, Proof, ProofOptions, PeaksOptions } from "./types";

bagThePeaks(elementsCount?: number): Promise<string>;
private static countOnes;
static mapLeafIndexToElementIndex(leafIndex: number): number;
retrievePeaksHashes(peaksIdxs: number[], formattingOpts?: PeaksFormattingOptions): Promise<string[]>;
clear(): Promise<void>;
}

@@ -175,2 +175,14 @@ "use strict";

}
static countOnes(value) {
let n = value;
let onesCount = 0;
while (n > 0) {
n = n & (n - 1);
onesCount++;
}
return onesCount;
}
static mapLeafIndexToElementIndex(leafIndex) {
return 2 * leafIndex - 1 - this.countOnes(leafIndex - 1);
}
async retrievePeaksHashes(peaksIdxs, formattingOpts) {

@@ -177,0 +189,0 @@ const hashes = await this.hashes.getMany(peaksIdxs);

4

package.json
{
"name": "@accumulators/merkle-mountain-range",
"version": "3.0.3",
"version": "3.0.7",
"description": "A TypeScript implementation of Merkle Mountain Ranges",

@@ -43,3 +43,3 @@ "keywords": [

},
"gitHead": "32874d15a33696896c4b0189f4699642da399849"
"gitHead": "f06f68ccfa058d5301a3e1bb8781619a299cd168"
}

Sorry, the diff of this file is not supported yet

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