UNPKG

@credo-ts/core

Version:

<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1

61 lines • 2.36 kB
import { KnownJwaSignatureAlgorithm } from "../jwk/jwa.mjs"; import { KmsCreateKeyType } from "./KmsCreateKeyOptions.mjs"; import { KmsDecryptDataDecryption } from "./KmsDecryptOptions.mjs"; import { KmsEncryptDataEncryption } from "./KmsEncryptOptions.mjs"; import { KmsKeyAgreementDecryptOptions } from "./KmsKeyAgreementDecryptOptions.mjs"; import { KmsKeyAgreementEncryptOptions } from "./KmsKeyAgreementEncryptOptions.mjs"; import { KmsJwkPrivate } from "../jwk/knownJwk.mjs"; import "../jwk/index.mjs"; //#region src/modules/kms/options/KmsOperation.d.ts export type KmsOperationCreateKey = { operation: 'createKey'; type: KmsCreateKeyType; }; export type KmsOperationImportKey = { operation: 'importKey'; privateJwk: KmsJwkPrivate; }; export type KmsOperationDeleteKey = { operation: 'deleteKey'; }; export type KmsOperationSign = { operation: 'sign'; algorithm: KnownJwaSignatureAlgorithm; }; export type KmsOperationVerify = { operation: 'verify'; algorithm: KnownJwaSignatureAlgorithm; }; /** * The key id is not needed to determine whether an operation is supported, and is * often not known yet when checking for support (e.g. the ephemeral key for `ECDH-ES` * is only created once we know the key agreement is supported). */ type WithOptionalKeyId<Options> = Options extends { keyId: string; } ? Omit<Options, 'keyId'> & { keyId?: string; } : Options; export type KmsOperationEncrypt = { operation: 'encrypt'; /** * `HPKE` for the integrated-encryption HPKE algorithms, where the suite fixes the AEAD. */ encryption: KmsEncryptDataEncryption; keyAgreement?: WithOptionalKeyId<KmsKeyAgreementEncryptOptions>; }; export type KmsOperationDecrypt = { operation: 'decrypt'; /** * `HPKE` for the integrated-encryption HPKE algorithms, where the suite fixes the AEAD. */ decryption: KmsDecryptDataDecryption; keyAgreement?: WithOptionalKeyId<KmsKeyAgreementDecryptOptions>; }; export type KmsOperationRandomBytes = { operation: 'randomBytes'; }; export type KmsOperation = KmsOperationCreateKey | KmsOperationImportKey | KmsOperationDeleteKey | KmsOperationSign | KmsOperationVerify | KmsOperationEncrypt | KmsOperationDecrypt | KmsOperationRandomBytes; export declare function getKmsOperationHumanDescription(operation: KmsOperation): string; //#endregion //# sourceMappingURL=KmsOperation.d.mts.map