UNPKG

@stable-io/cctp-sdk-cctpr-evm

Version:

EVM support for the CCTPR corridor of the CCTP SDK

20 lines 1.07 kB
// Copyright (c) 2025 Stable Technologies Inc // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. import { byteSwitchLayout } from "@stable-io/cctp-sdk-definitions"; import { corridorItem, supportedDomainItem, gasDropoffItem, usdcItem, evmGasTokenItem, timestampItem, evmDomainItem, } from "./common.js"; const relayFeeVariants = [ [[0, "usdc"], [{ name: "amount", ...usdcItem }]], [[1, "gasToken"], [{ name: "amount", ...evmGasTokenItem }]], ]; const relayFeeItem = byteSwitchLayout("chargeIn", relayFeeVariants); export const offChainQuoteLayout = (network) => [ { name: "sourceDomain", ...evmDomainItem }, { name: "destinationDomain", ...supportedDomainItem(network) }, { name: "corridor", ...corridorItem }, { name: "gasDropoff", ...gasDropoffItem }, { name: "expirationTime", ...timestampItem }, { name: "relayFee", ...relayFeeItem }, ]; //# sourceMappingURL=offChainQuote.js.map