libp2p-record
Advanced tools
Comparing version 0.10.3 to 0.10.4
{ | ||
"name": "libp2p-record", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"description": "libp2p record implementation", | ||
@@ -53,4 +53,3 @@ "leadMaintainer": "Vasco Santos <vasco.santos@moxy.studio>", | ||
"libp2p-crypto": "^0.19.0", | ||
"libp2p-interfaces": "^0.10.3", | ||
"multibase": "^4.0.3", | ||
"libp2p-interfaces": "^0.12.0", | ||
"npm-run-all": "^4.1.5", | ||
@@ -61,4 +60,3 @@ "peer-id": "^0.14.0" | ||
"err-code": "^3.0.0", | ||
"multihashes": "^4.0.2", | ||
"multihashing-async": "^2.1.2", | ||
"multiformats": "^9.1.2", | ||
"protobufjs": "^6.10.2", | ||
@@ -65,0 +63,0 @@ "uint8arrays": "^2.0.5" |
'use strict' | ||
const multihashing = require('multihashing-async') | ||
const { sha256 } = require('multiformats/hashes/sha2') | ||
const errcode = require('err-code') | ||
@@ -34,5 +34,5 @@ const uint8ArrayToString = require('uint8arrays/to-string') | ||
const publicKeyHash = await multihashing(publicKey, 'sha2-256') | ||
const publicKeyHash = await sha256.digest(publicKey) | ||
if (!uint8ArrayEquals(keyhash, publicKeyHash)) { | ||
if (!uint8ArrayEquals(keyhash, publicKeyHash.bytes)) { | ||
throw errcode(new Error('public key does not match passed in key'), 'ERR_INVALID_RECORD_HASH_MISMATCH') | ||
@@ -39,0 +39,0 @@ } |
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
4
5
29577
34
+ Addedmultiformats@^9.1.2
- Removedmultihashes@^4.0.2
- Removedmultihashing-async@^2.1.2
- Removed@multiformats/base-x@4.0.1(transitive)
- Removedblakejs@1.2.1(transitive)
- Removedjs-sha3@0.8.0(transitive)
- Removedmultibase@4.0.6(transitive)
- Removedmultihashes@4.0.3(transitive)
- Removedmultihashing-async@2.1.4(transitive)
- Removedmurmurhash3js-revisited@3.0.0(transitive)
- Removeduint8arrays@3.1.1(transitive)
- Removedvarint@5.0.2(transitive)