import { AbstractKeyStore } from './abstract-key-store.js'; import { AbstractKeyManagementSystem } from './abstract-key-management-system.js'; import { IAgentPlugin, IKey, IKeyManager, IKeyManagerCreateArgs, IKeyManagerDecryptJWEArgs, IKeyManagerDeleteArgs, IKeyManagerEncryptJWEArgs, IKeyManagerGetArgs, IKeyManagerSharedSecretArgs, IKeyManagerSignArgs, IKeyManagerSignEthTXArgs, IKeyManagerSignJWTArgs, ManagedKeyInfo, MinimalImportableKey } from '@veramo/core-types'; import { type ECDH } from 'did-jwt'; /** * Agent plugin that implements {@link @veramo/core-types#IKeyManager} methods. * * This plugin orchestrates various implementations of {@link AbstractKeyManagementSystem}, using a KeyStore 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 plugin are used automatically by other plugins, such as * {@link @veramo/did-manager#DIDManager | DIDManager}, * {@link @veramo/credential-w3c#CredentialPlugin | CredentialPlugin}, or {@link @veramo/did-comm#DIDComm | DIDComm} to * perform their required cryptographic operations using the managed keys. * * @public */ export declare class KeyManager implements IAgentPlugin { /** * Plugin methods * @public */ readonly methods: IKeyManager; readonly schema: { components: { schemas: { IKeyManagerCreateArgs: { description: string; properties: { kid: { description: string; type: string; }; kms: { description: string; type: string; }; meta: { $ref: string; description: string; }; type: { $ref: string; description: string; }; }; required: string[]; type: string; }; KeyMetadata: { description: string; properties: { algorithms: { items: { $ref: string; }; type: string; }; }; type: string; }; TAlg: { description: string; type: string; }; TKeyType: { description: string; type: string; }; ManagedKeyInfo: { description: string; properties: { kid: { description: string; type: string; }; kms: { description: string; type: string; }; meta: { anyOf: ({ type?: undefined; $ref: string; } | { $ref?: undefined; type: string; })[]; description: string; }; publicKeyHex: { description: string; type: string; }; type: { $ref: string; description: string; }; }; required: string[]; type: string; }; IKeyManagerDecryptJWEArgs: { description: string; properties: { data: { description: string; type: string; }; kid: { description: string; type: string; }; }; required: string[]; type: string; }; IKeyManagerDeleteArgs: { description: string; properties: { kid: { description: string; type: string; }; }; required: string[]; type: string; }; IKeyManagerEncryptJWEArgs: { description: string; properties: { data: { description: string; type: string; }; kid: { description: string; type: string; }; to: { description: string; properties: { kid: { description: string; type: string; }; meta: { anyOf: ({ type?: undefined; $ref: string; } | { $ref?: undefined; type: string; })[]; description: string; }; privateKeyHex: { description: string; type: string; }; publicKeyHex: { description: string; type: string; }; type: { $ref: string; description: string; }; }; required: string[]; type: string; }; }; required: string[]; type: string; }; IKeyManagerGetArgs: { description: string; properties: { kid: { description: string; type: string; }; }; required: string[]; type: string; }; IKey: { description: string; properties: { kid: { description: string; type: string; }; kms: { description: string; type: string; }; meta: { anyOf: ({ type?: undefined; $ref: string; } | { $ref?: undefined; type: string; })[]; description: string; }; privateKeyHex: { description: string; type: string; }; publicKeyHex: { description: string; type: string; }; type: { $ref: string; description: string; }; }; required: string[]; type: string; }; MinimalImportableKey: { $ref: string; description: string; }; "RequireOnly": { description: string; properties: { kid: { description: string; type: string; }; kms: { description: string; type: string; }; meta: { anyOf: ({ type?: undefined; $ref: string; } | { $ref?: undefined; type: string; })[]; description: string; }; privateKeyHex: { description: string; type: string; }; publicKeyHex: { description: string; type: string; }; type: { $ref: string; description: string; }; }; required: string[]; type: string; }; IKeyManagerSharedSecretArgs: { description: string; properties: { publicKey: { description: string; properties: { publicKeyHex: { description: string; type: string; }; type: { $ref: string; description: string; }; }; required: string[]; type: string; }; secretKeyRef: { description: string; type: string; }; }; required: string[]; type: string; }; IKeyManagerSignArgs: { description: string; properties: { algorithm: { description: string; type: string; }; data: { description: string; type: string; }; encoding: { description: string; enum: string[]; type: string; }; keyRef: { description: string; type: string; }; }; required: string[]; type: string; }; IKeyManagerSignEthTXArgs: { description: string; properties: { kid: { description: string; type: string; }; transaction: { description: string; type: string; }; }; required: string[]; type: string; }; IKeyManagerSignJWTArgs: { description: string; properties: { data: { anyOf: ({ type: string; additionalProperties?: undefined; properties?: undefined; required?: undefined; } | { additionalProperties: { type: string; }; properties: { BYTES_PER_ELEMENT: { type: string; }; buffer: { properties: { byteLength: { type: string; }; }; required: string[]; type: string; }; byteLength: { type: string; }; byteOffset: { type: string; }; length: { type: string; }; }; required: string[]; type: string; })[]; description: string; }; kid: { description: string; type: string; }; }; required: string[]; type: string; }; }; methods: { keyManagerCreate: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; keyManagerDecryptJWE: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerDelete: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerEncryptJWE: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerGet: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; keyManagerGetKeyManagementSystems: { description: string; arguments: { type: string; }; returnType: { type: string; items: { type: string; }; }; }; keyManagerImport: { description: string; arguments: { $ref: string; }; returnType: { $ref: string; }; }; keyManagerSharedSecret: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerSign: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerSignEthTX: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; keyManagerSignJWT: { description: string; arguments: { $ref: string; }; returnType: { type: string; }; }; }; }; }; private store; private readonly kms; constructor(options: { store: AbstractKeyStore; kms: Record; }); /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerGetKeyManagementSystems} */ keyManagerGetKeyManagementSystems(): Promise>; /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerCreate} */ keyManagerCreate(args: IKeyManagerCreateArgs): Promise; /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerGet} */ keyManagerGet({ kid }: IKeyManagerGetArgs): Promise; /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerDelete} */ keyManagerDelete({ kid }: IKeyManagerDeleteArgs): Promise; /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerImport} */ keyManagerImport(key: MinimalImportableKey): Promise; /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerEncryptJWE} */ keyManagerEncryptJWE({ kid, to, data }: IKeyManagerEncryptJWEArgs): Promise; /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerDecryptJWE} */ keyManagerDecryptJWE({ kid, data }: IKeyManagerDecryptJWEArgs): Promise; /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerSignJWT} */ keyManagerSignJWT({ kid, data }: IKeyManagerSignJWTArgs): Promise; /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerSign} */ keyManagerSign(args: IKeyManagerSignArgs): Promise; /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerSignEthTX} */ keyManagerSignEthTX({ kid, transaction }: IKeyManagerSignEthTXArgs): Promise; /** {@inheritDoc @veramo/core-types#IKeyManager.keyManagerSharedSecret} */ keyManagerSharedSecret(args: IKeyManagerSharedSecretArgs): Promise; createX25519ECDH(secretKeyRef: string): ECDH; private getKms; } //# sourceMappingURL=key-manager.d.ts.map