@libp2p/peer-id
Advanced tools
Comparing version 3.0.4 to 3.0.5
@@ -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'; |
{ | ||
"name": "@libp2p/peer-id", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "Implementation of @libp2p/interface-peer-id", | ||
@@ -52,3 +52,3 @@ "license": "Apache-2.0 OR MIT", | ||
"dependencies": { | ||
"@libp2p/interface": "^0.1.4", | ||
"@libp2p/interface": "^0.1.5", | ||
"multiformats": "^12.0.1", | ||
@@ -55,0 +55,0 @@ "uint8arrays": "^4.0.6" |
@@ -1,3 +0,1 @@ | ||
# @libp2p/peer-id <!-- omit in toc --> | ||
[](http://libp2p.io/) | ||
@@ -8,16 +6,4 @@ [](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
48309
583
34
Updated@libp2p/interface@^0.1.5