@libp2p/keychain 4.0.8 → 4.0.9-28e51652a
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 +22 -5
- package/dist/src/index.d.ts +17 -16
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -5
- package/dist/src/index.js.map +1 -1
- package/package.json +12 -11
- package/src/index.ts +17 -16
- package/dist/typedoc-urls.json +0 -14
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# @libp2p/keychain
|
|
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
|
- Manages the lifecycle of a key
|
|
11
28
|
- Keys are encrypted at rest
|
|
12
29
|
- Enforces the use of safe key names
|
|
@@ -19,10 +36,10 @@
|
|
|
19
36
|
|
|
20
37
|
The key management and naming service API all return a `KeyInfo` object. The `id` is a universally unique identifier for the key. The `name` is local to the key chain.
|
|
21
38
|
|
|
22
|
-
```
|
|
39
|
+
```JSON
|
|
23
40
|
{
|
|
24
|
-
name:
|
|
25
|
-
id:
|
|
41
|
+
"name": "rsa-key",
|
|
42
|
+
"id": "QmYWYSUZ4PV6MRFYpdtEDJBiGs4UrmE6g8wmAWSePekXVW"
|
|
26
43
|
}
|
|
27
44
|
```
|
|
28
45
|
|
|
@@ -36,9 +53,9 @@ A private key is stored as an encrypted PKCS 8 structure in the PEM format. It i
|
|
|
36
53
|
|
|
37
54
|
The default options for generating the derived encryption key are in the `dek` object. This, along with the passPhrase, is the input to a `PBKDF2` function.
|
|
38
55
|
|
|
39
|
-
```
|
|
56
|
+
```TypeScript
|
|
40
57
|
const defaultOptions = {
|
|
41
|
-
// See https://cryptosense.com/parameter-choice-for-pbkdf2/
|
|
58
|
+
// See https://cryptosense.com/parameter-choice-for-pbkdf2/
|
|
42
59
|
dek: {
|
|
43
60
|
keyLength: 512 / 8,
|
|
44
61
|
iterationCount: 1000,
|
package/dist/src/index.d.ts
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
*
|
|
14
14
|
* The key management and naming service API all return a `KeyInfo` object. The `id` is a universally unique identifier for the key. The `name` is local to the key chain.
|
|
15
15
|
*
|
|
16
|
-
* ```
|
|
16
|
+
* ```JSON
|
|
17
17
|
* {
|
|
18
|
-
* name:
|
|
19
|
-
* id:
|
|
18
|
+
* "name": "rsa-key",
|
|
19
|
+
* "id": "QmYWYSUZ4PV6MRFYpdtEDJBiGs4UrmE6g8wmAWSePekXVW"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
*
|
|
31
31
|
* The default options for generating the derived encryption key are in the `dek` object. This, along with the passPhrase, is the input to a `PBKDF2` function.
|
|
32
32
|
*
|
|
33
|
-
* ```
|
|
33
|
+
* ```TypeScript
|
|
34
34
|
* const defaultOptions = {
|
|
35
|
-
*
|
|
35
|
+
* // See https://cryptosense.com/parameter-choice-for-pbkdf2/
|
|
36
36
|
* dek: {
|
|
37
37
|
* keyLength: 512 / 8,
|
|
38
38
|
* iterationCount: 1000,
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
* }
|
|
42
42
|
* }
|
|
43
43
|
* ```
|
|
44
|
+
*
|
|
44
45
|
* 
|
|
45
46
|
*
|
|
46
47
|
* ## Physical storage
|
|
@@ -82,7 +83,7 @@ export interface Keychain {
|
|
|
82
83
|
*
|
|
83
84
|
* @example
|
|
84
85
|
*
|
|
85
|
-
* ```
|
|
86
|
+
* ```TypeScript
|
|
86
87
|
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
87
88
|
* const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123')
|
|
88
89
|
* ```
|
|
@@ -93,7 +94,7 @@ export interface Keychain {
|
|
|
93
94
|
*
|
|
94
95
|
* @example
|
|
95
96
|
*
|
|
96
|
-
* ```
|
|
97
|
+
* ```TypeScript
|
|
97
98
|
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
98
99
|
* const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123')
|
|
99
100
|
* const keyInfo = await libp2p.keychain.importKey('keyTestImport', pemKey, 'password123')
|
|
@@ -105,7 +106,7 @@ export interface Keychain {
|
|
|
105
106
|
*
|
|
106
107
|
* @example
|
|
107
108
|
*
|
|
108
|
-
* ```
|
|
109
|
+
* ```TypeScript
|
|
109
110
|
* const keyInfo = await libp2p.keychain.importPeer('keyTestImport', peerIdFromString('12D3Foo...'))
|
|
110
111
|
* ```
|
|
111
112
|
*/
|
|
@@ -115,7 +116,7 @@ export interface Keychain {
|
|
|
115
116
|
*
|
|
116
117
|
* @example
|
|
117
118
|
*
|
|
118
|
-
* ```
|
|
119
|
+
* ```TypeScript
|
|
119
120
|
* const peerId = await libp2p.keychain.exportPeerId('key-name')
|
|
120
121
|
* ```
|
|
121
122
|
*/
|
|
@@ -125,7 +126,7 @@ export interface Keychain {
|
|
|
125
126
|
*
|
|
126
127
|
* @example
|
|
127
128
|
*
|
|
128
|
-
* ```
|
|
129
|
+
* ```TypeScript
|
|
129
130
|
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
130
131
|
* ```
|
|
131
132
|
*/
|
|
@@ -135,7 +136,7 @@ export interface Keychain {
|
|
|
135
136
|
*
|
|
136
137
|
* @example
|
|
137
138
|
*
|
|
138
|
-
* ```
|
|
139
|
+
* ```TypeScript
|
|
139
140
|
* const keyInfos = await libp2p.keychain.listKeys()
|
|
140
141
|
* ```
|
|
141
142
|
*/
|
|
@@ -145,7 +146,7 @@ export interface Keychain {
|
|
|
145
146
|
*
|
|
146
147
|
* @example
|
|
147
148
|
*
|
|
148
|
-
* ```
|
|
149
|
+
* ```TypeScript
|
|
149
150
|
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
150
151
|
* const keyInfo = await libp2p.keychain.removeKey('keyTest')
|
|
151
152
|
* ```
|
|
@@ -156,7 +157,7 @@ export interface Keychain {
|
|
|
156
157
|
*
|
|
157
158
|
* @example
|
|
158
159
|
*
|
|
159
|
-
* ```
|
|
160
|
+
* ```TypeScript
|
|
160
161
|
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
161
162
|
* const keyInfo = await libp2p.keychain.renameKey('keyTest', 'keyNewNtest')
|
|
162
163
|
* ```
|
|
@@ -167,7 +168,7 @@ export interface Keychain {
|
|
|
167
168
|
*
|
|
168
169
|
* @example
|
|
169
170
|
*
|
|
170
|
-
* ```
|
|
171
|
+
* ```TypeScript
|
|
171
172
|
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
172
173
|
* const keyInfo2 = await libp2p.keychain.findKeyById(keyInfo.id)
|
|
173
174
|
* ```
|
|
@@ -178,7 +179,7 @@ export interface Keychain {
|
|
|
178
179
|
*
|
|
179
180
|
* @example
|
|
180
181
|
*
|
|
181
|
-
* ```
|
|
182
|
+
* ```TypeScript
|
|
182
183
|
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
183
184
|
* const keyInfo2 = await libp2p.keychain.findKeyByName('keyTest')
|
|
184
185
|
* ```
|
|
@@ -189,7 +190,7 @@ export interface Keychain {
|
|
|
189
190
|
*
|
|
190
191
|
* @example
|
|
191
192
|
*
|
|
192
|
-
* ```
|
|
193
|
+
* ```TypeScript
|
|
193
194
|
* await libp2p.keychain.rotateKeychainPass('oldPassword', 'newPassword')
|
|
194
195
|
* ```
|
|
195
196
|
*/
|
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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAEhE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,SAAS,CAAA;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,eAAe,CAAA;CACxB;AAED,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,QAAQ;IACvB;;;;;;;;;OASG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAA;IAElE;;;;;;;;;;OAUG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAExE;;;;;;;;OAQG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE1D;;;;;;;;OAQG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAE3C;;;;;;;;OAQG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAEvE;;;;;;;;OAQG;IACH,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;IAE9B;;;;;;;;;OASG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAEzC;;;;;;;;;OASG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE7D;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAEzC;;;;;;;;;OASG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE7C;;;;;;;;OAQG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpE;AAED,wBAAgB,QAAQ,CAAE,IAAI,GAAE,YAAiB,GAAG,CAAC,UAAU,EAAE,kBAAkB,KAAK,QAAQ,CAI/F"}
|
package/dist/src/index.js
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
*
|
|
14
14
|
* The key management and naming service API all return a `KeyInfo` object. The `id` is a universally unique identifier for the key. The `name` is local to the key chain.
|
|
15
15
|
*
|
|
16
|
-
* ```
|
|
16
|
+
* ```JSON
|
|
17
17
|
* {
|
|
18
|
-
* name:
|
|
19
|
-
* id:
|
|
18
|
+
* "name": "rsa-key",
|
|
19
|
+
* "id": "QmYWYSUZ4PV6MRFYpdtEDJBiGs4UrmE6g8wmAWSePekXVW"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
*
|
|
31
31
|
* The default options for generating the derived encryption key are in the `dek` object. This, along with the passPhrase, is the input to a `PBKDF2` function.
|
|
32
32
|
*
|
|
33
|
-
* ```
|
|
33
|
+
* ```TypeScript
|
|
34
34
|
* const defaultOptions = {
|
|
35
|
-
*
|
|
35
|
+
* // See https://cryptosense.com/parameter-choice-for-pbkdf2/
|
|
36
36
|
* dek: {
|
|
37
37
|
* keyLength: 512 / 8,
|
|
38
38
|
* iterationCount: 1000,
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
* }
|
|
42
42
|
* }
|
|
43
43
|
* ```
|
|
44
|
+
*
|
|
44
45
|
* 
|
|
45
46
|
*
|
|
46
47
|
* ## Physical storage
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAoK/C,MAAM,UAAU,QAAQ,CAAE,OAAqB,EAAE;IAC/C,OAAO,CAAC,UAA8B,EAAE,EAAE;QACxC,OAAO,IAAI,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;IAC9C,CAAC,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/keychain",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.9-28e51652a",
|
|
4
4
|
"description": "Key management and cryptographically protected messages",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/keychain#readme",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"clean": "aegir clean",
|
|
49
49
|
"lint": "aegir lint",
|
|
50
50
|
"dep-check": "aegir dep-check",
|
|
51
|
+
"doc-check": "aegir doc-check",
|
|
51
52
|
"build": "aegir build",
|
|
52
53
|
"test": "aegir test",
|
|
53
54
|
"test:chrome": "aegir test -t browser --cov",
|
|
@@ -58,20 +59,20 @@
|
|
|
58
59
|
"test:electron-main": "aegir test -t electron-main"
|
|
59
60
|
},
|
|
60
61
|
"dependencies": {
|
|
61
|
-
"@libp2p/crypto": "
|
|
62
|
-
"@libp2p/interface": "
|
|
63
|
-
"@libp2p/peer-id": "
|
|
64
|
-
"interface-datastore": "^8.2.
|
|
62
|
+
"@libp2p/crypto": "4.0.3-28e51652a",
|
|
63
|
+
"@libp2p/interface": "1.1.4-28e51652a",
|
|
64
|
+
"@libp2p/peer-id": "4.0.7-28e51652a",
|
|
65
|
+
"interface-datastore": "^8.2.11",
|
|
65
66
|
"merge-options": "^3.0.4",
|
|
66
|
-
"multiformats": "^13.0
|
|
67
|
+
"multiformats": "^13.1.0",
|
|
67
68
|
"sanitize-filename": "^1.6.3",
|
|
68
|
-
"uint8arrays": "^5.0.
|
|
69
|
+
"uint8arrays": "^5.0.2"
|
|
69
70
|
},
|
|
70
71
|
"devDependencies": {
|
|
71
|
-
"@libp2p/logger": "
|
|
72
|
-
"@libp2p/peer-id-factory": "
|
|
73
|
-
"aegir": "^42.2.
|
|
74
|
-
"datastore-core": "^9.2.
|
|
72
|
+
"@libp2p/logger": "4.0.7-28e51652a",
|
|
73
|
+
"@libp2p/peer-id-factory": "4.0.7-28e51652a",
|
|
74
|
+
"aegir": "^42.2.4",
|
|
75
|
+
"datastore-core": "^9.2.8"
|
|
75
76
|
},
|
|
76
77
|
"sideEffects": false
|
|
77
78
|
}
|
package/src/index.ts
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
*
|
|
14
14
|
* The key management and naming service API all return a `KeyInfo` object. The `id` is a universally unique identifier for the key. The `name` is local to the key chain.
|
|
15
15
|
*
|
|
16
|
-
* ```
|
|
16
|
+
* ```JSON
|
|
17
17
|
* {
|
|
18
|
-
* name:
|
|
19
|
-
* id:
|
|
18
|
+
* "name": "rsa-key",
|
|
19
|
+
* "id": "QmYWYSUZ4PV6MRFYpdtEDJBiGs4UrmE6g8wmAWSePekXVW"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
*
|
|
31
31
|
* The default options for generating the derived encryption key are in the `dek` object. This, along with the passPhrase, is the input to a `PBKDF2` function.
|
|
32
32
|
*
|
|
33
|
-
* ```
|
|
33
|
+
* ```TypeScript
|
|
34
34
|
* const defaultOptions = {
|
|
35
|
-
*
|
|
35
|
+
* // See https://cryptosense.com/parameter-choice-for-pbkdf2/
|
|
36
36
|
* dek: {
|
|
37
37
|
* keyLength: 512 / 8,
|
|
38
38
|
* iterationCount: 1000,
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
* }
|
|
42
42
|
* }
|
|
43
43
|
* ```
|
|
44
|
+
*
|
|
44
45
|
* 
|
|
45
46
|
*
|
|
46
47
|
* ## Physical storage
|
|
@@ -90,7 +91,7 @@ export interface Keychain {
|
|
|
90
91
|
*
|
|
91
92
|
* @example
|
|
92
93
|
*
|
|
93
|
-
* ```
|
|
94
|
+
* ```TypeScript
|
|
94
95
|
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
95
96
|
* const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123')
|
|
96
97
|
* ```
|
|
@@ -102,7 +103,7 @@ export interface Keychain {
|
|
|
102
103
|
*
|
|
103
104
|
* @example
|
|
104
105
|
*
|
|
105
|
-
* ```
|
|
106
|
+
* ```TypeScript
|
|
106
107
|
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
107
108
|
* const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123')
|
|
108
109
|
* const keyInfo = await libp2p.keychain.importKey('keyTestImport', pemKey, 'password123')
|
|
@@ -115,7 +116,7 @@ export interface Keychain {
|
|
|
115
116
|
*
|
|
116
117
|
* @example
|
|
117
118
|
*
|
|
118
|
-
* ```
|
|
119
|
+
* ```TypeScript
|
|
119
120
|
* const keyInfo = await libp2p.keychain.importPeer('keyTestImport', peerIdFromString('12D3Foo...'))
|
|
120
121
|
* ```
|
|
121
122
|
*/
|
|
@@ -126,7 +127,7 @@ export interface Keychain {
|
|
|
126
127
|
*
|
|
127
128
|
* @example
|
|
128
129
|
*
|
|
129
|
-
* ```
|
|
130
|
+
* ```TypeScript
|
|
130
131
|
* const peerId = await libp2p.keychain.exportPeerId('key-name')
|
|
131
132
|
* ```
|
|
132
133
|
*/
|
|
@@ -137,7 +138,7 @@ export interface Keychain {
|
|
|
137
138
|
*
|
|
138
139
|
* @example
|
|
139
140
|
*
|
|
140
|
-
* ```
|
|
141
|
+
* ```TypeScript
|
|
141
142
|
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
142
143
|
* ```
|
|
143
144
|
*/
|
|
@@ -148,7 +149,7 @@ export interface Keychain {
|
|
|
148
149
|
*
|
|
149
150
|
* @example
|
|
150
151
|
*
|
|
151
|
-
* ```
|
|
152
|
+
* ```TypeScript
|
|
152
153
|
* const keyInfos = await libp2p.keychain.listKeys()
|
|
153
154
|
* ```
|
|
154
155
|
*/
|
|
@@ -159,7 +160,7 @@ export interface Keychain {
|
|
|
159
160
|
*
|
|
160
161
|
* @example
|
|
161
162
|
*
|
|
162
|
-
* ```
|
|
163
|
+
* ```TypeScript
|
|
163
164
|
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
164
165
|
* const keyInfo = await libp2p.keychain.removeKey('keyTest')
|
|
165
166
|
* ```
|
|
@@ -171,7 +172,7 @@ export interface Keychain {
|
|
|
171
172
|
*
|
|
172
173
|
* @example
|
|
173
174
|
*
|
|
174
|
-
* ```
|
|
175
|
+
* ```TypeScript
|
|
175
176
|
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
176
177
|
* const keyInfo = await libp2p.keychain.renameKey('keyTest', 'keyNewNtest')
|
|
177
178
|
* ```
|
|
@@ -183,7 +184,7 @@ export interface Keychain {
|
|
|
183
184
|
*
|
|
184
185
|
* @example
|
|
185
186
|
*
|
|
186
|
-
* ```
|
|
187
|
+
* ```TypeScript
|
|
187
188
|
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
188
189
|
* const keyInfo2 = await libp2p.keychain.findKeyById(keyInfo.id)
|
|
189
190
|
* ```
|
|
@@ -195,7 +196,7 @@ export interface Keychain {
|
|
|
195
196
|
*
|
|
196
197
|
* @example
|
|
197
198
|
*
|
|
198
|
-
* ```
|
|
199
|
+
* ```TypeScript
|
|
199
200
|
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096)
|
|
200
201
|
* const keyInfo2 = await libp2p.keychain.findKeyByName('keyTest')
|
|
201
202
|
* ```
|
|
@@ -207,7 +208,7 @@ export interface Keychain {
|
|
|
207
208
|
*
|
|
208
209
|
* @example
|
|
209
210
|
*
|
|
210
|
-
* ```
|
|
211
|
+
* ```TypeScript
|
|
211
212
|
* await libp2p.keychain.rotateKeychainPass('oldPassword', 'newPassword')
|
|
212
213
|
* ```
|
|
213
214
|
*/
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"DEKConfig": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_keychain.DEKConfig.html",
|
|
3
|
-
".:DEKConfig": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_keychain.DEKConfig.html",
|
|
4
|
-
"KeyInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_keychain.KeyInfo.html",
|
|
5
|
-
".:KeyInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_keychain.KeyInfo.html",
|
|
6
|
-
"Keychain": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_keychain.Keychain.html",
|
|
7
|
-
".:Keychain": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_keychain.Keychain.html",
|
|
8
|
-
"KeychainComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_keychain.KeychainComponents.html",
|
|
9
|
-
".:KeychainComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_keychain.KeychainComponents.html",
|
|
10
|
-
"KeychainInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_keychain.KeychainInit.html",
|
|
11
|
-
".:KeychainInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_keychain.KeychainInit.html",
|
|
12
|
-
"keychain": "https://libp2p.github.io/js-libp2p/functions/_libp2p_keychain.keychain-1.html",
|
|
13
|
-
".:keychain": "https://libp2p.github.io/js-libp2p/functions/_libp2p_keychain.keychain-1.html"
|
|
14
|
-
}
|