1import * as paymentcryptographydata from "@distilled.cloud/aws/payment-cryptography-data";
2import * as Layer from "effect/Layer";
3import { makePaymentCryptographyKeyPairHttpBinding } from "./BindingHttp.ts";
4import { GeneratePinData } from "./GeneratePinData.ts";
5
6/**
7 * HTTP implementation of {@link GeneratePinData} — grants the host Function
8 * `payment-cryptography:GeneratePinData` on both the generation key (PVK)
9 * and the encryption key (PEK) and calls the Payment Cryptography Data API
10 * at runtime.
11 */
12export const GeneratePinDataHttp = Layer.effect(
13 GeneratePinData,
14 makePaymentCryptographyKeyPairHttpBinding({
15 tag: "AWS.PaymentCryptography.GeneratePinData",
16 operation: paymentcryptographydata.generatePinData,
17 actions: ["payment-cryptography:GeneratePinData"],
18 keyFields: ["GenerationKeyIdentifier", "EncryptionKeyIdentifier"],
19 }),
20);