@libp2p/peer-id 4.0.6 → 4.0.7-2122a713d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +2 -2
- package/package.json +6 -5
- package/src/index.ts +2 -2
- package/dist/typedoc-urls.json +0 -14
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# @libp2p/peer-id
|
|
2
|
+
|
|
1
3
|
[](http://libp2p.io/)
|
|
2
4
|
[](https://discuss.libp2p.io)
|
|
3
5
|
[](https://codecov.io/gh/libp2p/js-libp2p)
|
|
@@ -7,6 +9,21 @@
|
|
|
7
9
|
|
|
8
10
|
# About
|
|
9
11
|
|
|
12
|
+
<!--
|
|
13
|
+
|
|
14
|
+
!IMPORTANT!
|
|
15
|
+
|
|
16
|
+
Everything in this README between "# About" and "# Install" is automatically
|
|
17
|
+
generated and will be overwritten the next time the doc generator is run.
|
|
18
|
+
|
|
19
|
+
To make changes to this section, please update the @packageDocumentation section
|
|
20
|
+
of src/index.js or src/index.ts
|
|
21
|
+
|
|
22
|
+
To experiment with formatting, please run "npm run docs" from the root of this
|
|
23
|
+
repo and examine the changes made.
|
|
24
|
+
|
|
25
|
+
-->
|
|
26
|
+
|
|
10
27
|
An implementation of a peer id
|
|
11
28
|
|
|
12
29
|
## Example
|
|
@@ -15,7 +32,7 @@ An implementation of a peer id
|
|
|
15
32
|
import { peerIdFromString } from '@libp2p/peer-id'
|
|
16
33
|
const peer = peerIdFromString('k51qzi5uqu5dkwkqm42v9j9kqcam2jiuvloi16g72i4i4amoo2m8u3ol3mqu6s')
|
|
17
34
|
|
|
18
|
-
console.log(peer.
|
|
35
|
+
console.log(peer.toCID()) // CID(bafzaa...)
|
|
19
36
|
console.log(peer.toString()) // "12D3K..."
|
|
20
37
|
```
|
|
21
38
|
|
package/dist/src/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* import { peerIdFromString } from '@libp2p/peer-id'
|
|
10
10
|
* const peer = peerIdFromString('k51qzi5uqu5dkwkqm42v9j9kqcam2jiuvloi16g72i4i4amoo2m8u3ol3mqu6s')
|
|
11
11
|
*
|
|
12
|
-
* console.log(peer.
|
|
12
|
+
* console.log(peer.toCID()) // CID(bafzaa...)
|
|
13
13
|
* console.log(peer.toString()) // "12D3K..."
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
package/dist/src/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* import { peerIdFromString } from '@libp2p/peer-id'
|
|
10
10
|
* const peer = peerIdFromString('k51qzi5uqu5dkwkqm42v9j9kqcam2jiuvloi16g72i4i4amoo2m8u3ol3mqu6s')
|
|
11
11
|
*
|
|
12
|
-
* console.log(peer.
|
|
12
|
+
* console.log(peer.toCID()) // CID(bafzaa...)
|
|
13
13
|
* console.log(peer.toString()) // "12D3K..."
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
@@ -97,7 +97,7 @@ class PeerIdImpl {
|
|
|
97
97
|
* https://nodejs.org/api/util.html#utilinspectcustom
|
|
98
98
|
*
|
|
99
99
|
* @example
|
|
100
|
-
* ```
|
|
100
|
+
* ```TypeScript
|
|
101
101
|
* import { peerIdFromString } from '@libp2p/peer-id'
|
|
102
102
|
*
|
|
103
103
|
* console.info(peerIdFromString('QmFoo'))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/peer-id",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7-2122a713d",
|
|
4
4
|
"description": "Implementation of @libp2p/interface-peer-id",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/peer-id#readme",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"clean": "aegir clean",
|
|
44
44
|
"lint": "aegir lint",
|
|
45
45
|
"dep-check": "aegir dep-check",
|
|
46
|
+
"doc-check": "aegir doc-check",
|
|
46
47
|
"build": "aegir build",
|
|
47
48
|
"test": "aegir test",
|
|
48
49
|
"test:chrome": "aegir test -t browser --cov",
|
|
@@ -53,12 +54,12 @@
|
|
|
53
54
|
"test:electron-main": "aegir test -t electron-main"
|
|
54
55
|
},
|
|
55
56
|
"dependencies": {
|
|
56
|
-
"@libp2p/interface": "
|
|
57
|
-
"multiformats": "^13.0
|
|
58
|
-
"uint8arrays": "^5.0.
|
|
57
|
+
"@libp2p/interface": "1.1.4-2122a713d",
|
|
58
|
+
"multiformats": "^13.1.0",
|
|
59
|
+
"uint8arrays": "^5.0.2"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
|
-
"aegir": "^42.2.
|
|
62
|
+
"aegir": "^42.2.4"
|
|
62
63
|
},
|
|
63
64
|
"sideEffects": false
|
|
64
65
|
}
|
package/src/index.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* import { peerIdFromString } from '@libp2p/peer-id'
|
|
10
10
|
* const peer = peerIdFromString('k51qzi5uqu5dkwkqm42v9j9kqcam2jiuvloi16g72i4i4amoo2m8u3ol3mqu6s')
|
|
11
11
|
*
|
|
12
|
-
* console.log(peer.
|
|
12
|
+
* console.log(peer.toCID()) // CID(bafzaa...)
|
|
13
13
|
* console.log(peer.toString()) // "12D3K..."
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
@@ -136,7 +136,7 @@ class PeerIdImpl {
|
|
|
136
136
|
* https://nodejs.org/api/util.html#utilinspectcustom
|
|
137
137
|
*
|
|
138
138
|
* @example
|
|
139
|
-
* ```
|
|
139
|
+
* ```TypeScript
|
|
140
140
|
* import { peerIdFromString } from '@libp2p/peer-id'
|
|
141
141
|
*
|
|
142
142
|
* console.info(peerIdFromString('QmFoo'))
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"createPeerId": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.createPeerId.html",
|
|
3
|
-
".:createPeerId": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.createPeerId.html",
|
|
4
|
-
"peerIdFromBytes": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.peerIdFromBytes.html",
|
|
5
|
-
".:peerIdFromBytes": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.peerIdFromBytes.html",
|
|
6
|
-
"peerIdFromCID": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.peerIdFromCID.html",
|
|
7
|
-
".:peerIdFromCID": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.peerIdFromCID.html",
|
|
8
|
-
"peerIdFromKeys": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.peerIdFromKeys.html",
|
|
9
|
-
".:peerIdFromKeys": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.peerIdFromKeys.html",
|
|
10
|
-
"peerIdFromPeerId": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.peerIdFromPeerId.html",
|
|
11
|
-
".:peerIdFromPeerId": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.peerIdFromPeerId.html",
|
|
12
|
-
"peerIdFromString": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.peerIdFromString.html",
|
|
13
|
-
".:peerIdFromString": "https://libp2p.github.io/js-libp2p/functions/_libp2p_peer_id.peerIdFromString.html"
|
|
14
|
-
}
|