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

38 lines (37 loc) • 1.28 kB
import { zKnownJwaSignatureAlgorithm } from "../jwk/jwa.mjs"; import { zAnyUint8Array } from "../../../utils/zod.mjs"; import { zKmsJwkPublicAsymmetric } from "../jwk/knownJwk.mjs"; import { zKmsKeyId } from "./common.mjs"; import { z as z$1 } from "zod"; //#region src/modules/kms/options/KmsVerifyOptions.ts const zKmsVerifyOptions = z$1.object({ /** * The key to verify with. Either a string referring to a keyId, or a `KmsJwkPublicAsymmetric` for verifying with a * public asymmetric JWK. * * It is currently not possible to verify a signature for a symmetric key * that is not already present in the KMS. */ key: z$1.union([z$1.object({ keyId: zKmsKeyId, publicJwk: z$1.never().optional() }), z$1.object({ publicJwk: zKmsJwkPublicAsymmetric, keyId: z$1.never().optional() })]), /** * The JWA signature algorithm to use for verification */ algorithm: zKnownJwaSignatureAlgorithm.describe("The JWA signature algorithm to use for verification"), /** * The data to verify */ data: zAnyUint8Array.describe("The data to verify"), /** * The signature to verify the data against */ signature: zAnyUint8Array.describe("The signature on the data to verify") }); //#endregion export { zKmsVerifyOptions }; //# sourceMappingURL=KmsVerifyOptions.mjs.map