import type { ManagedKey, PortableKey, SignOptions, CryptoManager, VerifyOptions, DecryptOptions, EncryptOptions, ManagedKeyPair, GenerateKeyType, ManagedKeyStore, UpdateKeyOptions, DeriveBitsOptions, PortableKeyPair, GenerateKeyOptions, KeyManagementSystem, GenerateKeyOptionTypes } from './types/managed-key.js'; import { IDManagedAgent } from './types/agent.js'; export type KmsMap = { [name: string]: KeyManagementSystem; }; export type KeyManagerOptions = { agent?: IDManagedAgent; kms?: KmsMap; store?: ManagedKeyStore; }; /** * KeyManager * * This class orchestrates implementations of {@link KeyManagementSystem}, * using a ManagedKeyStore to remember the link between a key reference, * its metadata, and the respective key management system that provides the * actual cryptographic capabilities. * * The methods of this class are used automatically by other Agent * components to perform their required cryptographic operations using * the managed keys. * * @public */ export declare class KeyManager implements CryptoManager { /** * Holds the instance of a `IDManagedAgent` that represents the current * execution context for the `KeyManager`. This agent is utilized * to interact with other agent components. It's vital * to ensure this instance is set to correctly contextualize * operations within the broader agent framework. */ private _agent?; private _defaultSigningKey?; private _kms; private _store; constructor(options?: KeyManagerOptions); /** * Retrieves the `IDManagedAgent` execution context. * If the `agent` instance proprety is undefined, it will throw an error. * * @returns The `IDManagedAgent` instance that represents the current execution * context. * * @throws Will throw an error if the `agent` instance property is undefined. */ get agent(): IDManagedAgent; set agent(agent: IDManagedAgent); decrypt(options: DecryptOptions): Promise; deriveBits(options: DeriveBitsOptions): Promise; encrypt(options: EncryptOptions): Promise; generateKey(options: GenerateKeyOptions & { kms?: string; }): Promise>; getKey({ keyRef }: { keyRef: string; }): Promise; importKey(options: PortableKeyPair): Promise; importKey(options: PortableKey): Promise; listKms(): string[]; setDefaultSigningKey({ key }: { key: PortableKeyPair; }): Promise; sign(options: SignOptions): Promise; updateKey(options: UpdateKeyOptions): Promise; verify(options: VerifyOptions): Promise; private getKms; private useMemoryKms; } //# sourceMappingURL=key-manager.d.ts.map