Skip to content

Commit db60895

Browse files
authored
fix: add missing method to keychain interface to rotate password (libp2p#340)
Adds method from keychain implementation that is missing from interface
1 parent 817701a commit db60895

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/interface-keychain/src/index.ts

+11
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,15 @@ export interface KeyChain {
154154
* ```
155155
*/
156156
findKeyByName: (name: string) => Promise<KeyInfo>
157+
158+
/**
159+
* Rotate keychain password and re-encrypt all associated keys
160+
*
161+
* @example
162+
*
163+
* ```js
164+
* await libp2p.keychain.rotateKeychainPass('oldPassword', 'newPassword')
165+
* ```
166+
*/
167+
rotateKeychainPass: (oldPass: string, newPass: string) => Promise<void>
157168
}

0 commit comments

Comments
 (0)