@libp2p/keychain
Advanced tools
Comparing version 4.1.5 to 4.1.6
@@ -87,4 +87,4 @@ /** | ||
* ```TypeScript | ||
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123') | ||
* await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const pemKey = await libp2p.services.keychain.exportKey('keyTest', 'password123') | ||
* ``` | ||
@@ -99,5 +99,5 @@ */ | ||
* ```TypeScript | ||
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123') | ||
* const keyInfo = await libp2p.keychain.importKey('keyTestImport', pemKey, 'password123') | ||
* await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const pemKey = await libp2p.services.keychain.exportKey('keyTest', 'password123') | ||
* const keyInfo = await libp2p.services.keychain.importKey('keyTestImport', pemKey, 'password123') | ||
* ``` | ||
@@ -112,3 +112,3 @@ */ | ||
* ```TypeScript | ||
* const keyInfo = await libp2p.keychain.importPeer('keyTestImport', peerIdFromString('12D3Foo...')) | ||
* const keyInfo = await libp2p.services.keychain.importPeer('keyTestImport', peerIdFromString('12D3Foo...')) | ||
* ``` | ||
@@ -123,3 +123,3 @@ */ | ||
* ```TypeScript | ||
* const peerId = await libp2p.keychain.exportPeerId('key-name') | ||
* const peerId = await libp2p.services.keychain.exportPeerId('key-name') | ||
* ``` | ||
@@ -134,3 +134,3 @@ */ | ||
* ```TypeScript | ||
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo = await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* ``` | ||
@@ -145,3 +145,3 @@ */ | ||
* ```TypeScript | ||
* const keyInfos = await libp2p.keychain.listKeys() | ||
* const keyInfos = await libp2p.services.keychain.listKeys() | ||
* ``` | ||
@@ -156,4 +156,4 @@ */ | ||
* ```TypeScript | ||
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo = await libp2p.keychain.removeKey('keyTest') | ||
* await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo = await libp2p.services.keychain.removeKey('keyTest') | ||
* ``` | ||
@@ -168,4 +168,4 @@ */ | ||
* ```TypeScript | ||
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo = await libp2p.keychain.renameKey('keyTest', 'keyNewNtest') | ||
* await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo = await libp2p.services.keychain.renameKey('keyTest', 'keyNewNtest') | ||
* ``` | ||
@@ -180,4 +180,4 @@ */ | ||
* ```TypeScript | ||
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo2 = await libp2p.keychain.findKeyById(keyInfo.id) | ||
* const keyInfo = await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo2 = await libp2p.services.keychain.findKeyById(keyInfo.id) | ||
* ``` | ||
@@ -192,4 +192,4 @@ */ | ||
* ```TypeScript | ||
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo2 = await libp2p.keychain.findKeyByName('keyTest') | ||
* const keyInfo = await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo2 = await libp2p.services.keychain.findKeyByName('keyTest') | ||
* ``` | ||
@@ -204,3 +204,3 @@ */ | ||
* ```TypeScript | ||
* await libp2p.keychain.rotateKeychainPass('oldPassword', 'newPassword') | ||
* await libp2p.services.keychain.rotateKeychainPass('oldPassword', 'newPassword') | ||
* ``` | ||
@@ -207,0 +207,0 @@ */ |
{ | ||
"name": "@libp2p/keychain", | ||
"version": "4.1.5", | ||
"version": "4.1.6", | ||
"description": "Key management and cryptographically protected messages", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT", |
@@ -95,4 +95,4 @@ /** | ||
* ```TypeScript | ||
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123') | ||
* await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const pemKey = await libp2p.services.keychain.exportKey('keyTest', 'password123') | ||
* ``` | ||
@@ -108,5 +108,5 @@ */ | ||
* ```TypeScript | ||
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const pemKey = await libp2p.keychain.exportKey('keyTest', 'password123') | ||
* const keyInfo = await libp2p.keychain.importKey('keyTestImport', pemKey, 'password123') | ||
* await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const pemKey = await libp2p.services.keychain.exportKey('keyTest', 'password123') | ||
* const keyInfo = await libp2p.services.keychain.importKey('keyTestImport', pemKey, 'password123') | ||
* ``` | ||
@@ -122,3 +122,3 @@ */ | ||
* ```TypeScript | ||
* const keyInfo = await libp2p.keychain.importPeer('keyTestImport', peerIdFromString('12D3Foo...')) | ||
* const keyInfo = await libp2p.services.keychain.importPeer('keyTestImport', peerIdFromString('12D3Foo...')) | ||
* ``` | ||
@@ -134,3 +134,3 @@ */ | ||
* ```TypeScript | ||
* const peerId = await libp2p.keychain.exportPeerId('key-name') | ||
* const peerId = await libp2p.services.keychain.exportPeerId('key-name') | ||
* ``` | ||
@@ -146,3 +146,3 @@ */ | ||
* ```TypeScript | ||
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo = await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* ``` | ||
@@ -158,3 +158,3 @@ */ | ||
* ```TypeScript | ||
* const keyInfos = await libp2p.keychain.listKeys() | ||
* const keyInfos = await libp2p.services.keychain.listKeys() | ||
* ``` | ||
@@ -170,4 +170,4 @@ */ | ||
* ```TypeScript | ||
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo = await libp2p.keychain.removeKey('keyTest') | ||
* await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo = await libp2p.services.keychain.removeKey('keyTest') | ||
* ``` | ||
@@ -183,4 +183,4 @@ */ | ||
* ```TypeScript | ||
* await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo = await libp2p.keychain.renameKey('keyTest', 'keyNewNtest') | ||
* await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo = await libp2p.services.keychain.renameKey('keyTest', 'keyNewNtest') | ||
* ``` | ||
@@ -196,4 +196,4 @@ */ | ||
* ```TypeScript | ||
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo2 = await libp2p.keychain.findKeyById(keyInfo.id) | ||
* const keyInfo = await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo2 = await libp2p.services.keychain.findKeyById(keyInfo.id) | ||
* ``` | ||
@@ -209,4 +209,4 @@ */ | ||
* ```TypeScript | ||
* const keyInfo = await libp2p.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo2 = await libp2p.keychain.findKeyByName('keyTest') | ||
* const keyInfo = await libp2p.services.keychain.createKey('keyTest', 'RSA', 4096) | ||
* const keyInfo2 = await libp2p.services.keychain.findKeyByName('keyTest') | ||
* ``` | ||
@@ -222,3 +222,3 @@ */ | ||
* ```TypeScript | ||
* await libp2p.keychain.rotateKeychainPass('oldPassword', 'newPassword') | ||
* await libp2p.services.keychain.rotateKeychainPass('oldPassword', 'newPassword') | ||
* ``` | ||
@@ -225,0 +225,0 @@ */ |
250694