@chainsafe/persistent-merkle-tree
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35828
571