Socket
Socket
Sign inDemoInstall

libp2p-record

Package Overview
Dependencies
Maintainers
4
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libp2p-record - npm Package Compare versions

Comparing version 0.10.3 to 0.10.4

8

package.json
{
"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 @@ }

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