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

@libp2p/peer-id

Package Overview
Dependencies
Maintainers
4
Versions
552
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/peer-id - npm Package Compare versions

Comparing version 1.1.9 to 1.1.10

4

dist/src/index.d.ts

@@ -24,2 +24,6 @@ import { CID } from 'multiformats/cid';

/**
* Returns Multiaddr as a JSON encoded object
*/
toJSON(): string;
/**
* Checks the equality of `this` peer against a given PeerId

@@ -26,0 +30,0 @@ */

10

dist/src/index.js

@@ -51,2 +51,8 @@ import { CID } from 'multiformats/cid';

/**
* Returns Multiaddr as a JSON encoded object
*/
toJSON() {
return this.toString();
}
/**
* Checks the equality of `this` peer against a given PeerId

@@ -153,6 +159,6 @@ */

else if (multihash.code === identity.code) {
if (multihash.bytes.length === MARSHALLED_ED225519_PUBLIC_KEY_LENGTH) {
if (multihash.digest.length === MARSHALLED_ED225519_PUBLIC_KEY_LENGTH) {
return new Ed25519PeerIdImpl({ multihash: cid.multihash });
}
else if (multihash.bytes.length === MARSHALLED_SECP258K1_PUBLIC_KEY_LENGTH) {
else if (multihash.digest.length === MARSHALLED_SECP258K1_PUBLIC_KEY_LENGTH) {
return new Secp256k1PeerIdImpl({ multihash: cid.multihash });

@@ -159,0 +165,0 @@ }

{
"name": "@libp2p/peer-id",
"version": "1.1.9",
"version": "1.1.10",
"description": "IPFS Peer Id implementation in Node.js",

@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT",

@@ -94,2 +94,9 @@ import { CID } from 'multiformats/cid'

/**
* Returns Multiaddr as a JSON encoded object
*/
toJSON () {
return this.toString()
}
/**
* Checks the equality of `this` peer against a given PeerId

@@ -217,5 +224,5 @@ */

} else if (multihash.code === identity.code) {
if (multihash.bytes.length === MARSHALLED_ED225519_PUBLIC_KEY_LENGTH) {
if (multihash.digest.length === MARSHALLED_ED225519_PUBLIC_KEY_LENGTH) {
return new Ed25519PeerIdImpl({ multihash: cid.multihash })
} else if (multihash.bytes.length === MARSHALLED_SECP258K1_PUBLIC_KEY_LENGTH) {
} else if (multihash.digest.length === MARSHALLED_SECP258K1_PUBLIC_KEY_LENGTH) {
return new Secp256k1PeerIdImpl({ multihash: cid.multihash })

@@ -222,0 +229,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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