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