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

@chainsafe/persistent-merkle-tree

Package Overview
Dependencies
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainsafe/persistent-merkle-tree - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

16

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.2.2 (2021-02-11)
## Features
* Add concatGindices ([bb74df](https://github.com/chainsafe/persistent-merkle-tree/commit/bb74df))
## 0.2.1 (2020-07-32)

@@ -5,3 +11,3 @@

* Fix subtreeFillToContents edge cases ([8a2012](https://github.com/persistent-merkle-tree/commit/8a2012))
* Fix subtreeFillToContents edge cases ([8a2012](https://github.com/chainsafe/persistent-merkle-tree/commit/8a2012))

@@ -12,7 +18,7 @@ ## 0.2.0 (2020-07-27)

* Add iterateNodestDepth ([24ca18](https://github.com/persistent-merkle-tree/commit/24ca18))
* Add iterateNodestDepth ([24ca18](https://github.com/chainsafe/persistent-merkle-tree/commit/24ca18))
## BREAKING CHANGES
* Rearrange params, depth first where appropriate ([24ca18](https://github.com/persistent-merkle-tree/commit/24ca18))
* Rearrange params, depth first where appropriate ([24ca18](https://github.com/chainsafe/persistent-merkle-tree/commit/24ca18))

@@ -23,3 +29,3 @@ ## 0.1.3 (2020-06-07)

* remove bigint literals ([461fb7](https://github.com/persistent-merkle-tree/commit/461fb7))
* remove bigint literals ([461fb7](https://github.com/chainsafe/persistent-merkle-tree/commit/461fb7))

@@ -30,2 +36,2 @@ ## 0.1.2 (2020-02-26)

* use @chainsafe/as-sha256 sha2 implementation ([b9bcfe](https://github.com/persistent-merkle-tree/commit/b9bcfe))
* use @chainsafe/as-sha256 sha2 implementation ([b9bcfe](https://github.com/chainsafe/persistent-merkle-tree/commit/b9bcfe))

@@ -16,1 +16,7 @@ export declare type Gindex = bigint;

export declare function gindexIterator(gindex: Gindex | GindexBitstring): GindexIterator;
/**
* Concatenate Generalized Indices
* Given generalized indices i1 for A -> B, i2 for B -> C .... i_n for Y -> Z, returns
* the generalized index for A -> Z.
*/
export declare function concatGindices(gindices: Gindex[]): Gindex;

@@ -96,1 +96,10 @@ "use strict";

exports.gindexIterator = gindexIterator;
/**
* Concatenate Generalized Indices
* Given generalized indices i1 for A -> B, i2 for B -> C .... i_n for Y -> Z, returns
* the generalized index for A -> Z.
*/
function concatGindices(gindices) {
return BigInt(gindices.reduce((acc, gindex) => acc + gindex.toString(2).slice(1), "0b1"));
}
exports.concatGindices = concatGindices;
{
"name": "@chainsafe/persistent-merkle-tree",
"version": "0.2.1",
"version": "0.2.2",
"description": "Merkle tree implemented as a persistent datastructure",

@@ -5,0 +5,0 @@ "main": "lib/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