New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@libp2p/peer-id

Package Overview
Dependencies
Maintainers
6
Versions
648
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 3.0.3 to 3.0.4-69581367

15

dist/src/index.d.ts

@@ -0,1 +1,16 @@

/**
* @packageDocumentation
*
* An implementation of a peer id
*
* @example
*
* ```JavaScript
* import { peerIdFromString } from '@libp2p/peer-id'
* const peer = peerIdFromString('k51qzi5uqu5dkwkqm42v9j9kqcam2jiuvloi16g72i4i4amoo2m8u3ol3mqu6s')
*
* console.log(peer.toCid()) // CID(bafzaa...)
* console.log(peer.toString()) // "12D3K..."
* ```
*/
import { type PeerIdType, type PeerId } from '@libp2p/interface/peer-id';

@@ -2,0 +17,0 @@ import { CID } from 'multiformats/cid';

@@ -0,1 +1,16 @@

/**
* @packageDocumentation
*
* An implementation of a peer id
*
* @example
*
* ```JavaScript
* import { peerIdFromString } from '@libp2p/peer-id'
* const peer = peerIdFromString('k51qzi5uqu5dkwkqm42v9j9kqcam2jiuvloi16g72i4i4amoo2m8u3ol3mqu6s')
*
* console.log(peer.toCid()) // CID(bafzaa...)
* console.log(peer.toString()) // "12D3K..."
* ```
*/
import { CodeError } from '@libp2p/interface/errors';

@@ -2,0 +17,0 @@ import { symbol } from '@libp2p/interface/peer-id';

4

package.json
{
"name": "@libp2p/peer-id",
"version": "3.0.3",
"version": "3.0.4-69581367",
"description": "Implementation of @libp2p/interface-peer-id",

@@ -52,3 +52,3 @@ "license": "Apache-2.0 OR MIT",

"dependencies": {
"@libp2p/interface": "^0.1.3",
"@libp2p/interface": "0.1.4-69581367",
"multiformats": "^12.0.1",

@@ -55,0 +55,0 @@ "uint8arrays": "^4.0.6"

@@ -1,3 +0,1 @@

# @libp2p/peer-id <!-- omit in toc -->
[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)

@@ -8,16 +6,4 @@ [![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)

> Implementation of @libp2p/interface-peer-id
# Install
## Table of contents <!-- omit in toc -->
- [Install](#install)
- [Browser `<script>` tag](#browser-script-tag)
- [Description](#description)
- [Example](#example)
- [API Docs](#api-docs)
- [License](#license)
- [Contribution](#contribution)
## Install
```console

@@ -27,3 +13,3 @@ $ npm i @libp2p/peer-id

### Browser `<script>` tag
## Browser `<script>` tag

@@ -36,22 +22,7 @@ Loading this module through a script tag will make it's exports available as `Libp2pPeerId` in the global namespace.

## Description
# API Docs
A basic implementation of a peer id
## Example
```JavaScript
import { peerIdFromString } from '@libp2p/peer-id'
const peer = peerIdFromString('k51qzi5uqu5dkwkqm42v9j9kqcam2jiuvloi16g72i4i4amoo2m8u3ol3mqu6s')
console.log(peer.toCid()) // CID(bafzaa...)
console.log(peer.toString()) // "12D3K..."
```
## API Docs
- <https://libp2p.github.io/js-libp2p/modules/_libp2p_peer_id.html>
## License
# License

@@ -63,4 +34,4 @@ Licensed under either of

## Contribution
# Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

@@ -0,1 +1,17 @@

/**
* @packageDocumentation
*
* An implementation of a peer id
*
* @example
*
* ```JavaScript
* import { peerIdFromString } from '@libp2p/peer-id'
* const peer = peerIdFromString('k51qzi5uqu5dkwkqm42v9j9kqcam2jiuvloi16g72i4i4amoo2m8u3ol3mqu6s')
*
* console.log(peer.toCid()) // CID(bafzaa...)
* console.log(peer.toString()) // "12D3K..."
* ```
*/
import { CodeError } from '@libp2p/interface/errors'

@@ -2,0 +18,0 @@ import { type Ed25519PeerId, type PeerIdType, type RSAPeerId, type Secp256k1PeerId, symbol, type PeerId } from '@libp2p/interface/peer-id'

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