@chainsafe/ssz
Advanced tools
Comparing version 0.10.2 to 0.11.0
@@ -23,2 +23,17 @@ # Change Log | ||
## [0.11.0](https://github.com/ChainSafe/ssz/compare/ssz-v0.10.2...ssz-v0.11.0) (2023-04-05) | ||
### Features | ||
* add swappable hasher, default to noble-hashes ([#314](https://github.com/ChainSafe/ssz/issues/314)) ([4b44614](https://github.com/ChainSafe/ssz/commit/4b44614003619b2c5477363a3c85287e2f2987bd)) | ||
### Dependencies | ||
* The following workspace dependencies were updated | ||
* dependencies | ||
* @chainsafe/as-sha256 bumped to 0.4.0 | ||
* @chainsafe/persistent-merkle-tree bumped to 0.6.0 | ||
## [0.10.2](https://github.com/ChainSafe/ssz/compare/ssz-v0.10.1...ssz-v0.10.2) (2023-02-28) | ||
@@ -25,0 +40,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { HashObject } from "@chainsafe/as-sha256"; | ||
import { HashObject } from "@chainsafe/as-sha256/hashObject"; | ||
import { Node } from "@chainsafe/persistent-merkle-tree"; | ||
@@ -3,0 +3,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.nextPowerOf2 = exports.maxChunksToDepth = exports.bitLength = exports.mixInLength = exports.splitIntoRootChunks = exports.merkleize = exports.hash64 = void 0; | ||
const as_sha256_1 = require("@chainsafe/as-sha256"); | ||
const hasher_1 = require("@chainsafe/persistent-merkle-tree/hasher"); | ||
const zeros_1 = require("./zeros"); | ||
function hash64(bytes32A, bytes32B) { | ||
return as_sha256_1.digest2Bytes32(bytes32A, bytes32B); | ||
return hasher_1.hasher.digest64(bytes32A, bytes32B); | ||
} | ||
@@ -9,0 +9,0 @@ exports.hash64 = hash64; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.zeroHash = void 0; | ||
const as_sha256_1 = require("@chainsafe/as-sha256"); | ||
const hasher_1 = require("@chainsafe/persistent-merkle-tree/hasher"); | ||
// create array of "zero hashes", successively hashed zero chunks | ||
@@ -10,3 +10,3 @@ const zeroHashes = [new Uint8Array(32)]; | ||
for (let i = zeroHashes.length; i <= depth; i++) { | ||
zeroHashes[i] = as_sha256_1.digest2Bytes32(zeroHashes[i - 1], zeroHashes[i - 1]); | ||
zeroHashes[i] = hasher_1.hasher.digest64(zeroHashes[i - 1], zeroHashes[i - 1]); | ||
} | ||
@@ -13,0 +13,0 @@ } |
@@ -7,3 +7,3 @@ { | ||
"homepage": "https://github.com/chainsafe/ssz", | ||
"version": "0.10.2", | ||
"version": "0.11.0", | ||
"main": "lib/index.js", | ||
@@ -39,4 +39,4 @@ "files": [ | ||
"dependencies": { | ||
"@chainsafe/as-sha256": "^0.3.1", | ||
"@chainsafe/persistent-merkle-tree": "^0.5.0" | ||
"@chainsafe/as-sha256": "^0.4.0", | ||
"@chainsafe/persistent-merkle-tree": "^0.6.0" | ||
}, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
471982
+ Added@chainsafe/as-sha256@0.4.2(transitive)
+ Added@chainsafe/persistent-merkle-tree@0.6.1(transitive)
+ Added@noble/hashes@1.5.0(transitive)
- Removed@chainsafe/as-sha256@0.3.1(transitive)
- Removed@chainsafe/persistent-merkle-tree@0.5.0(transitive)
Updated@chainsafe/as-sha256@^0.4.0