@libp2p/peer-id 1.0.0 → 1.0.4
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/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +108 -25
- package/src/index.ts +2 -2
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CID } from 'multiformats/cid';
|
|
2
|
-
import type { MultibaseDecoder, MultibaseEncoder } from 'multiformats/
|
|
3
|
-
import type { MultihashDigest } from 'multiformats/
|
|
2
|
+
import type { MultibaseDecoder, MultibaseEncoder } from 'multiformats/bases/interface';
|
|
3
|
+
import type { MultihashDigest } from 'multiformats/hashes/interface';
|
|
4
4
|
interface PeerIdOptions {
|
|
5
5
|
type: 'RSA' | 'Ed25519' | 'secp256k1';
|
|
6
6
|
multihash: MultihashDigest;
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAMtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAMtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAepE,UAAU,aAAa;IACrB,IAAI,EAAE,KAAK,GAAG,SAAS,GAAG,WAAW,CAAA;IACrC,SAAS,EAAE,eAAe,CAAA;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB;AAED,UAAU,gBAAgB;IACxB,SAAS,EA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MAAM;IACzC,SAAgB,IAAI,eAAc;IAClC,SAAgB,SAAS,EAAE,UAAU,CAAA;gBAExB,IAAI,EAAE,sBAAsB;CAK1C"}
|
package/package.json
CHANGED
|
@@ -1,25 +1,123 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/peer-id",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "IPFS Peer Id implementation in Node.js",
|
|
5
|
+
"license": "Apache-2.0 OR MIT",
|
|
6
|
+
"homepage": "https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-peer-id#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/libp2p/js-libp2p-interfaces.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/libp2p/js-libp2p-interfaces/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"IPFS"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=16.0.0",
|
|
19
|
+
"npm": ">=7.0.0"
|
|
20
|
+
},
|
|
5
21
|
"type": "module",
|
|
6
22
|
"types": "./dist/src/index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"import": "./dist/src/index.js"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
23
|
"files": [
|
|
13
24
|
"src",
|
|
14
25
|
"dist/src",
|
|
26
|
+
"!dist/test",
|
|
15
27
|
"!**/*.tsbuildinfo"
|
|
16
28
|
],
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": "./dist/src/index.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
17
34
|
"eslintConfig": {
|
|
18
35
|
"extends": "ipfs",
|
|
19
36
|
"parserOptions": {
|
|
20
37
|
"sourceType": "module"
|
|
21
38
|
}
|
|
22
39
|
},
|
|
40
|
+
"release": {
|
|
41
|
+
"branches": [
|
|
42
|
+
"master"
|
|
43
|
+
],
|
|
44
|
+
"plugins": [
|
|
45
|
+
[
|
|
46
|
+
"@semantic-release/commit-analyzer",
|
|
47
|
+
{
|
|
48
|
+
"preset": "conventionalcommits",
|
|
49
|
+
"releaseRules": [
|
|
50
|
+
{
|
|
51
|
+
"breaking": true,
|
|
52
|
+
"release": "major"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"revert": true,
|
|
56
|
+
"release": "patch"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "feat",
|
|
60
|
+
"release": "minor"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "fix",
|
|
64
|
+
"release": "patch"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "chore",
|
|
68
|
+
"release": "patch"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "docs",
|
|
72
|
+
"release": "patch"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "test",
|
|
76
|
+
"release": "patch"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"scope": "no-release",
|
|
80
|
+
"release": false
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
[
|
|
86
|
+
"@semantic-release/release-notes-generator",
|
|
87
|
+
{
|
|
88
|
+
"preset": "conventionalcommits",
|
|
89
|
+
"presetConfig": {
|
|
90
|
+
"types": [
|
|
91
|
+
{
|
|
92
|
+
"type": "feat",
|
|
93
|
+
"section": "Features"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "fix",
|
|
97
|
+
"section": "Bug Fixes"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "chore",
|
|
101
|
+
"section": "Trivial Changes"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "docs",
|
|
105
|
+
"section": "Trivial Changes"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"type": "test",
|
|
109
|
+
"section": "Tests"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"@semantic-release/changelog",
|
|
116
|
+
"@semantic-release/npm",
|
|
117
|
+
"@semantic-release/github",
|
|
118
|
+
"@semantic-release/git"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
23
121
|
"scripts": {
|
|
24
122
|
"lint": "aegir lint",
|
|
25
123
|
"dep-check": "aegir dep-check dist/src/**/*.js",
|
|
@@ -33,27 +131,12 @@
|
|
|
33
131
|
"test:node": "npm run test -- -t node --cov",
|
|
34
132
|
"test:electron-main": "npm run test -- -t electron-main"
|
|
35
133
|
},
|
|
36
|
-
"keywords": [
|
|
37
|
-
"IPFS"
|
|
38
|
-
],
|
|
39
|
-
"license": "MIT",
|
|
40
|
-
"engines": {
|
|
41
|
-
"node": ">=15.0.0"
|
|
42
|
-
},
|
|
43
|
-
"repository": {
|
|
44
|
-
"type": "git",
|
|
45
|
-
"url": "git+https://github.com/libp2p/js-libp2p-interfaces.git"
|
|
46
|
-
},
|
|
47
|
-
"bugs": {
|
|
48
|
-
"url": "https://github.com/libp2p/js-libp2p-interfaces/issues"
|
|
49
|
-
},
|
|
50
|
-
"homepage": "https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-peer-id#readme",
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"aegir": "^36.1.3"
|
|
53
|
-
},
|
|
54
134
|
"dependencies": {
|
|
55
|
-
"@libp2p/interfaces": "^0.
|
|
135
|
+
"@libp2p/interfaces": "^1.0.0",
|
|
56
136
|
"multiformats": "^9.4.5",
|
|
57
137
|
"uint8arrays": "^3.0.0"
|
|
138
|
+
},
|
|
139
|
+
"devDependencies": {
|
|
140
|
+
"aegir": "^36.1.3"
|
|
58
141
|
}
|
|
59
142
|
}
|
package/src/index.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { base58btc } from 'multiformats/bases/base58'
|
|
|
4
4
|
import * as Digest from 'multiformats/hashes/digest'
|
|
5
5
|
import { identity } from 'multiformats/hashes/identity'
|
|
6
6
|
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
|
|
7
|
-
import type { MultibaseDecoder, MultibaseEncoder } from 'multiformats/
|
|
8
|
-
import type { MultihashDigest } from 'multiformats/
|
|
7
|
+
import type { MultibaseDecoder, MultibaseEncoder } from 'multiformats/bases/interface'
|
|
8
|
+
import type { MultihashDigest } from 'multiformats/hashes/interface'
|
|
9
9
|
import { sha256 } from 'multiformats/hashes/sha2'
|
|
10
10
|
|
|
11
11
|
const baseDecoder = Object
|