1import type * as paymentcryptographydata from "@distilled.cloud/aws/payment-cryptography-data";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Key } from "./Key.ts";
5
6export interface GenerateAs2805KekValidationRequest extends Omit<
7 paymentcryptographydata.GenerateAs2805KekValidationInput,
8 "KeyIdentifier"
9> {}
10
11/**
12 * Runtime binding for `payment-cryptography:GenerateAs2805KekValidation` —
13 * generates AS2805 Key Encryption Key (KEK) validation data (random key
14 * send/receive components) under a KEK {@link Key}, used during AS2805 node
15 * key establishment in Australian payment networks. Provide
16 * `GenerateAs2805KekValidationHttp` on the Function to satisfy this service.
17 * ### AS2805 Key Establishment
18 * **Example:** Generate KEK validation data
19 * ```typescript
20 * // init
21 * const generateKekValidation =
22 * yield* PaymentCryptography.GenerateAs2805KekValidation(kek);
23 *
24 * // runtime
25 * const validation = yield* generateKekValidation({
26 * KekValidationType: "KEKS",
27 * RandomKeySendVariantMask: mask,
28 * });
29 * ```
30 *
31 * @binding
32 */
33export interface GenerateAs2805KekValidation extends Binding.Service<
34 GenerateAs2805KekValidation,
35 "AWS.PaymentCryptography.GenerateAs2805KekValidation",
36 <K extends Key>(
37 key: K,
38 ) => Effect.Effect<
39 (
40 request: GenerateAs2805KekValidationRequest,
41 ) => Effect.Effect<
42 paymentcryptographydata.GenerateAs2805KekValidationOutput,
43 paymentcryptographydata.GenerateAs2805KekValidationError
44 >
45 >
46> {}
47
48export const GenerateAs2805KekValidation =
49 Binding.Service<GenerateAs2805KekValidation>(
50 "AWS.PaymentCryptography.GenerateAs2805KekValidation",
51 );