| 1 | import * as paymentcryptographydata from "@distilled.cloud/aws/payment-cryptography-data"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makePaymentCryptographyKeyHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { VerifyCardValidationData } from "./VerifyCardValidationData.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link VerifyCardValidationData} — grants the host |
| 8 | * Function `payment-cryptography:VerifyCardValidationData` on the CVK and |
| 9 | * calls the Payment Cryptography Data API at runtime. A mismatch fails with |
| 10 | * the typed `VerificationFailedException`. |
| 11 | */ |
| 12 | export const VerifyCardValidationDataHttp = Layer.effect( |
| 13 | VerifyCardValidationData, |
| 14 | makePaymentCryptographyKeyHttpBinding({ |
| 15 | tag: "AWS.PaymentCryptography.VerifyCardValidationData", |
| 16 | operation: paymentcryptographydata.verifyCardValidationData, |
| 17 | actions: ["payment-cryptography:VerifyCardValidationData"], |
| 18 | }), |
| 19 | ); |