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.1 to 1.1.2

4

dist/src/index.d.ts
import { CID } from 'multiformats/cid';
import type { MultibaseDecoder, MultibaseEncoder } from 'multiformats/bases/interface';
import type { MultihashDigest } from 'multiformats/hashes/interface';
declare const peerIdSymbol: unique symbol;
interface PeerIdOptions {

@@ -28,2 +29,5 @@ type: 'RSA' | 'Ed25519' | 'secp256k1';

constructor(opts: PeerIdOptions);
static isPeerId(other: any): other is PeerId;
get [Symbol.toStringTag](): string;
get [peerIdSymbol](): boolean;
toString(codec?: MultibaseEncoder<any>): string;

@@ -30,0 +34,0 @@ toCID(): CID;

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

import errcode from 'err-code';
const peerIdSymbol = Symbol.for('@libp2p/peer-id');
const baseDecoder = Object

@@ -25,2 +26,11 @@ .values(bases)

}
static isPeerId(other) {
return peerIdSymbol in other;
}
get [Symbol.toStringTag]() {
return peerIdSymbol.toString();
}
get [peerIdSymbol]() {
return true;
}
toString(codec) {

@@ -27,0 +37,0 @@ if (codec == null) {

2

package.json
{
"name": "@libp2p/peer-id",
"version": "1.1.1",
"version": "1.1.2",
"description": "IPFS Peer Id implementation in Node.js",

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

@@ -12,2 +12,4 @@ import { CID } from 'multiformats/cid'

const peerIdSymbol = Symbol.for('@libp2p/peer-id')
const baseDecoder = Object

@@ -59,2 +61,14 @@ .values(bases)

static isPeerId (other: any): other is PeerId {
return peerIdSymbol in other
}
get [Symbol.toStringTag] () {
return peerIdSymbol.toString()
}
get [peerIdSymbol] () {
return true
}
toString (codec?: MultibaseEncoder<any>) {

@@ -61,0 +75,0 @@ if (codec == null) {

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