@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
290 lines • 14.1 kB
text/typescript
import { z as z$1 } from "zod";
//#region src/modules/kms/options/KmsDecryptOptions.d.ts
declare const zKmsDecryptDataDecryptionAesGcm: z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
A128GCM: "A128GCM";
A192GCM: "A192GCM";
A256GCM: "A256GCM";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
tag: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>;
export type KmsDecryptDataDecryptionAesGcm = z$1.output<typeof zKmsDecryptDataDecryptionAesGcm>;
declare const zKmsDecryptDataDecryptionAesCbc: z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
A128CBC: "A128CBC";
A256CBC: "A256CBC";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>;
export type KmsDecryptDataDecryptionAesCbc = z$1.output<typeof zKmsDecryptDataDecryptionAesCbc>;
declare const zKmsDecryptDataDecryptionC20p: z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
C20P: "C20P";
XC20P: "XC20P";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
tag: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>;
export type KmsDecryptDataDecryptionC20p = z$1.output<typeof zKmsDecryptDataDecryptionC20p>;
/**
* Integrated-encryption HPKE. The HPKE suite (see the `HPKE-*` key agreement algorithms) fixes the
* AEAD, and both the content encryption key and the nonce are derived from the HPKE key schedule.
* The tag is part of the HPKE ciphertext, so the only parameter left to the caller is the aad.
*/
declare const zKmsDecryptDataDecryptionHpke: z$1.ZodObject<{
algorithm: z$1.ZodLiteral<"HPKE">;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
}, z$1.core.$strip>;
export type KmsDecryptDataDecryptionHpke = z$1.output<typeof zKmsDecryptDataDecryptionHpke>;
declare const zKmsDecryptDataDecryption: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
A128CBC: "A128CBC";
A256CBC: "A256CBC";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>, z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
"A128CBC-HS256": "A128CBC-HS256";
"A192CBC-HS384": "A192CBC-HS384";
"A256CBC-HS512": "A256CBC-HS512";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
tag: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>, z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
A128GCM: "A128GCM";
A192GCM: "A192GCM";
A256GCM: "A256GCM";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
tag: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>, z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
C20P: "C20P";
XC20P: "XC20P";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
tag: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>, z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
"XSALSA20-POLY1305": "XSALSA20-POLY1305";
}>;
iv: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
}, z$1.core.$strip>, z$1.ZodObject<{
algorithm: z$1.ZodLiteral<"HPKE">;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
}, z$1.core.$strip>], "algorithm">;
export type KmsDecryptDataDecryption = z$1.output<typeof zKmsDecryptDataDecryption>;
/**
* Content decryption excluding the integrated-encryption HPKE marker, so the AEAD parameters a
* backend performs the actual content decryption with.
*/
export type KmsDecryptDataContentDecryption = Exclude<KmsDecryptDataDecryption, {
algorithm: 'HPKE';
}>;
export declare const zKmsDecryptOptions: z$1.ZodObject<{
key: z$1.ZodUnion<readonly [z$1.ZodObject<{
keyId: z$1.ZodString;
privateJwk: z$1.ZodOptional<z$1.ZodNever>;
keyAgreement: z$1.ZodOptional<z$1.ZodNever>;
}, z$1.core.$strip>, z$1.ZodObject<{
privateJwk: z$1.ZodObject<{
k: z$1.ZodString;
kty: z$1.ZodLiteral<"oct">;
kid: z$1.ZodOptional<z$1.ZodString>;
alg: z$1.ZodOptional<z$1.ZodString>;
key_ops: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sign">, z$1.ZodLiteral<"verify">, z$1.ZodLiteral<"encrypt">, z$1.ZodLiteral<"decrypt">, z$1.ZodLiteral<"wrapKey">, z$1.ZodLiteral<"unwrapKey">, z$1.ZodLiteral<"deriveKey">, z$1.ZodLiteral<"deriveBits">]>, z$1.ZodString]>>>;
use: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sig">, z$1.ZodLiteral<"enc">]>, z$1.ZodString]>>;
ext: z$1.ZodOptional<z$1.ZodBoolean>;
x5c: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
x5t: z$1.ZodOptional<z$1.ZodString>;
'x5t#S256': z$1.ZodOptional<z$1.ZodString>;
x5u: z$1.ZodOptional<z$1.ZodString>;
}, z$1.core.$strip>;
keyId: z$1.ZodOptional<z$1.ZodNever>;
keyAgreement: z$1.ZodOptional<z$1.ZodNever>;
}, z$1.core.$strip>, z$1.ZodObject<{
keyAgreement: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
keyId: z$1.ZodString;
algorithm: z$1.ZodLiteral<"ECDH-ES">;
externalPublicJwk: z$1.ZodUnion<readonly [z$1.ZodObject<{
kty: z$1.ZodLiteral<"OKP">;
x: z$1.ZodString;
d: z$1.ZodOptional<z$1.ZodString>;
kid: z$1.ZodOptional<z$1.ZodString>;
alg: z$1.ZodOptional<z$1.ZodString>;
key_ops: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sign">, z$1.ZodLiteral<"verify">, z$1.ZodLiteral<"encrypt">, z$1.ZodLiteral<"decrypt">, z$1.ZodLiteral<"wrapKey">, z$1.ZodLiteral<"unwrapKey">, z$1.ZodLiteral<"deriveKey">, z$1.ZodLiteral<"deriveBits">]>, z$1.ZodString]>>>;
use: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sig">, z$1.ZodLiteral<"enc">]>, z$1.ZodString]>>;
ext: z$1.ZodOptional<z$1.ZodBoolean>;
x5c: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
x5t: z$1.ZodOptional<z$1.ZodString>;
'x5t#S256': z$1.ZodOptional<z$1.ZodString>;
x5u: z$1.ZodOptional<z$1.ZodString>;
crv: z$1.ZodEnum<{
X25519: "X25519";
}>;
}, z$1.core.$strip>, z$1.ZodObject<{
kty: z$1.ZodLiteral<"EC">;
x: z$1.ZodString;
y: z$1.ZodString;
d: z$1.ZodOptional<z$1.ZodUndefined>;
kid: z$1.ZodOptional<z$1.ZodString>;
alg: z$1.ZodOptional<z$1.ZodString>;
key_ops: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sign">, z$1.ZodLiteral<"verify">, z$1.ZodLiteral<"encrypt">, z$1.ZodLiteral<"decrypt">, z$1.ZodLiteral<"wrapKey">, z$1.ZodLiteral<"unwrapKey">, z$1.ZodLiteral<"deriveKey">, z$1.ZodLiteral<"deriveBits">]>, z$1.ZodString]>>>;
use: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sig">, z$1.ZodLiteral<"enc">]>, z$1.ZodString]>>;
ext: z$1.ZodOptional<z$1.ZodBoolean>;
x5c: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
x5t: z$1.ZodOptional<z$1.ZodString>;
'x5t#S256': z$1.ZodOptional<z$1.ZodString>;
x5u: z$1.ZodOptional<z$1.ZodString>;
crv: z$1.ZodEnum<{
"P-256": "P-256";
"P-384": "P-384";
"P-521": "P-521";
secp256k1: "secp256k1";
}>;
}, z$1.core.$strip>]>;
apu: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
apv: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
}, z$1.core.$strip>, z$1.ZodObject<{
keyId: z$1.ZodString;
algorithm: z$1.ZodEnum<{
"ECDH-ES+A128KW": "ECDH-ES+A128KW";
"ECDH-ES+A192KW": "ECDH-ES+A192KW";
"ECDH-ES+A256KW": "ECDH-ES+A256KW";
}>;
externalPublicJwk: z$1.ZodUnion<readonly [z$1.ZodObject<{
kty: z$1.ZodLiteral<"OKP">;
x: z$1.ZodString;
d: z$1.ZodOptional<z$1.ZodString>;
kid: z$1.ZodOptional<z$1.ZodString>;
alg: z$1.ZodOptional<z$1.ZodString>;
key_ops: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sign">, z$1.ZodLiteral<"verify">, z$1.ZodLiteral<"encrypt">, z$1.ZodLiteral<"decrypt">, z$1.ZodLiteral<"wrapKey">, z$1.ZodLiteral<"unwrapKey">, z$1.ZodLiteral<"deriveKey">, z$1.ZodLiteral<"deriveBits">]>, z$1.ZodString]>>>;
use: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sig">, z$1.ZodLiteral<"enc">]>, z$1.ZodString]>>;
ext: z$1.ZodOptional<z$1.ZodBoolean>;
x5c: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
x5t: z$1.ZodOptional<z$1.ZodString>;
'x5t#S256': z$1.ZodOptional<z$1.ZodString>;
x5u: z$1.ZodOptional<z$1.ZodString>;
crv: z$1.ZodEnum<{
X25519: "X25519";
}>;
}, z$1.core.$strip>, z$1.ZodObject<{
kty: z$1.ZodLiteral<"EC">;
x: z$1.ZodString;
y: z$1.ZodString;
d: z$1.ZodOptional<z$1.ZodUndefined>;
kid: z$1.ZodOptional<z$1.ZodString>;
alg: z$1.ZodOptional<z$1.ZodString>;
key_ops: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sign">, z$1.ZodLiteral<"verify">, z$1.ZodLiteral<"encrypt">, z$1.ZodLiteral<"decrypt">, z$1.ZodLiteral<"wrapKey">, z$1.ZodLiteral<"unwrapKey">, z$1.ZodLiteral<"deriveKey">, z$1.ZodLiteral<"deriveBits">]>, z$1.ZodString]>>>;
use: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sig">, z$1.ZodLiteral<"enc">]>, z$1.ZodString]>>;
ext: z$1.ZodOptional<z$1.ZodBoolean>;
x5c: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
x5t: z$1.ZodOptional<z$1.ZodString>;
'x5t#S256': z$1.ZodOptional<z$1.ZodString>;
x5u: z$1.ZodOptional<z$1.ZodString>;
crv: z$1.ZodEnum<{
"P-256": "P-256";
"P-384": "P-384";
"P-521": "P-521";
secp256k1: "secp256k1";
}>;
}, z$1.core.$strip>]>;
encryptedKey: z$1.ZodObject<{
tag: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
iv: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
encrypted: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>;
apu: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
apv: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
}, z$1.core.$strip>, z$1.ZodObject<{
keyId: z$1.ZodString;
algorithm: z$1.ZodLiteral<"ECDH-HSALSA20">;
externalPublicJwk: z$1.ZodOptional<z$1.ZodObject<{
kty: z$1.ZodLiteral<"OKP">;
x: z$1.ZodString;
d: z$1.ZodOptional<z$1.ZodString>;
kid: z$1.ZodOptional<z$1.ZodString>;
alg: z$1.ZodOptional<z$1.ZodString>;
key_ops: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sign">, z$1.ZodLiteral<"verify">, z$1.ZodLiteral<"encrypt">, z$1.ZodLiteral<"decrypt">, z$1.ZodLiteral<"wrapKey">, z$1.ZodLiteral<"unwrapKey">, z$1.ZodLiteral<"deriveKey">, z$1.ZodLiteral<"deriveBits">]>, z$1.ZodString]>>>;
use: z$1.ZodOptional<z$1.ZodUnion<readonly [z$1.ZodUnion<readonly [z$1.ZodLiteral<"sig">, z$1.ZodLiteral<"enc">]>, z$1.ZodString]>>;
ext: z$1.ZodOptional<z$1.ZodBoolean>;
x5c: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
x5t: z$1.ZodOptional<z$1.ZodString>;
'x5t#S256': z$1.ZodOptional<z$1.ZodString>;
x5u: z$1.ZodOptional<z$1.ZodString>;
crv: z$1.ZodEnum<{
X25519: "X25519";
}>;
}, z$1.core.$strip>>;
}, z$1.core.$strip>, z$1.ZodObject<{
keyId: z$1.ZodString;
algorithm: z$1.ZodEnum<{
"HPKE-0": "HPKE-0";
"HPKE-3": "HPKE-3";
"HPKE-7": "HPKE-7";
}>;
encapsulatedKey: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
info: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
}, z$1.core.$strip>], "algorithm">;
keyId: z$1.ZodOptional<z$1.ZodNever>;
privateJwk: z$1.ZodOptional<z$1.ZodNever>;
}, z$1.core.$strip>]>;
decryption: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
A128CBC: "A128CBC";
A256CBC: "A256CBC";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>, z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
"A128CBC-HS256": "A128CBC-HS256";
"A192CBC-HS384": "A192CBC-HS384";
"A256CBC-HS512": "A256CBC-HS512";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
tag: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>, z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
A128GCM: "A128GCM";
A192GCM: "A192GCM";
A256GCM: "A256GCM";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
tag: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>, z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
C20P: "C20P";
XC20P: "XC20P";
}>;
iv: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
tag: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>, z$1.ZodObject<{
algorithm: z$1.ZodEnum<{
"XSALSA20-POLY1305": "XSALSA20-POLY1305";
}>;
iv: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
}, z$1.core.$strip>, z$1.ZodObject<{
algorithm: z$1.ZodLiteral<"HPKE">;
aad: z$1.ZodOptional<z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>>;
}, z$1.core.$strip>], "algorithm">;
encrypted: z$1.ZodInstanceOf<Uint8Array<ArrayBufferLike>>;
}, z$1.core.$strip>;
export type KmsDecryptOptions = z$1.output<typeof zKmsDecryptOptions>;
export interface KmsDecryptReturn {
/**
* The decrypted data
*/
data: Uint8Array;
}
//#endregion
//# sourceMappingURL=KmsDecryptOptions.d.mts.map