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