import type { Keychain as KeychainInterface, KeyInfo, GenerateKeyOptions, KeychainComponents, KeychainInit } from './index.ts'; import type { PrivateKey, PublicKey } from '@ipshipyard/crypto'; import type { AbortOptions } from 'abort-error'; declare const serviceCapabilities: unique symbol; /** * Manages the life cycle of a key. Keys are encrypted at rest using PKCS #8. * * A key in the store has two entries * - '/info/*key-name*', contains the KeyInfo for the key * - '/pkcs8/*key-name*', contains the PKCS #8 for the key */ export declare class Keychain implements KeychainInterface { private readonly components; private readonly self; private cipher; private salt; private keychainDekOptions; private privateKeyDekOptions; /** * Creates a new instance of a key chain */ constructor(components: KeychainComponents, init?: KeychainInit); readonly [serviceCapabilities]: string[]; generateKey(name: string, options?: GenerateKeyOptions): Promise; importKey(name: string, key: PrivateKey, options?: AbortOptions): Promise; private _importKey; exportKey(name: string, options?: AbortOptions): Promise; private _exportKey; removeKey(name: string, options?: AbortOptions): Promise; /** * List all the keys */ listKeys(options?: AbortOptions): AsyncGenerator; /** * Rename a key * * @param {string} oldName - The old local key name; must already exist. * @param {string} newName - The new local key name; must not already exist. * @returns {Promise} */ renameKey(oldName: string, newName: string, options?: AbortOptions): Promise; /** * Rotate keychain password and re-encrypt all associated keys */ rotateKeychainPass(password: string, options?: AbortOptions): Promise; loadPublicKeyFromProtobuf(buf: Uint8Array, options?: AbortOptions): Promise; } export {}; //# sourceMappingURL=keychain.d.ts.map