diff --git a/packages/client/src/types/converters.ts b/packages/client/src/types/converters.ts index fba8ebe14..b6f0859ee 100644 --- a/packages/client/src/types/converters.ts +++ b/packages/client/src/types/converters.ts @@ -100,6 +100,8 @@ import { SwapExactCoinInJSON, SwapExactCoinOut, SwapExactCoinOutJSON, + SmartRelayFeeQuote, + SmartRelayFeeQuoteJSON, SmartSwapExactCoinIn, SmartSwapExactCoinInJSON, SwapJSON, @@ -1520,6 +1522,28 @@ export function bankSendToJSON(value: BankSend): BankSendJSON { }; } +export function smartRelayFeeQuoteFromJSON(value: SmartRelayFeeQuoteJSON): SmartRelayFeeQuote { + return { + feeAmount: value.fee_amount, + feeAddress: value.fee_address, + paymentContractAddress: value.payment_contract_address, + relayerAddress: value.relayer_address, + expiration: value.expiration, + token: value.token, + } +} + +export function smartRelayFeeQuoteToJSON(value: SmartRelayFeeQuote): SmartRelayFeeQuoteJSON { + return { + fee_amount: value.feeAmount, + fee_address: value.feeAddress, + payment_contract_address: value.paymentContractAddress, + relayer_address: value.relayerAddress, + expiration: value.expiration, + token: value.token, + } +} + export function cctpTransferFromJSON(value: CCTPTransferJSON): CCTPTransfer { return { fromChainID: value.from_chain_id, @@ -1529,6 +1553,7 @@ export function cctpTransferFromJSON(value: CCTPTransferJSON): CCTPTransfer { denomIn: value.denom_in, denomOut: value.denom_out, smartRelay: value.smart_relay, + smartRelayFeeQuote: smartRelayFeeQuoteFromJSON(value.smart_relay_fee_quote), }; } @@ -1541,6 +1566,7 @@ export function cctpTransferToJSON(value: CCTPTransfer): CCTPTransferJSON { denom_in: value.denomIn, denom_out: value.denomOut, smart_relay: value.smartRelay, + smart_relay_fee_quote: smartRelayFeeQuoteToJSON(value.smartRelayFeeQuote), }; } diff --git a/packages/client/src/types/shared.ts b/packages/client/src/types/shared.ts index 9f5af0129..7d29ef707 100644 --- a/packages/client/src/types/shared.ts +++ b/packages/client/src/types/shared.ts @@ -211,6 +211,7 @@ export type CCTPTransferJSON = { denom_in: string; denom_out: string; smart_relay: boolean; + smart_relay_fee_quote: SmartRelayFeeQuoteJSON; }; export type CCTPTransfer = { @@ -221,6 +222,7 @@ export type CCTPTransfer = { denomIn: string; denomOut: string; smartRelay: boolean; + smartRelayFeeQuote: SmartRelayFeeQuote; }; export type HyperlaneTransferJSON = { @@ -269,6 +271,24 @@ export type OPInitTransfer = { smartRelay: boolean; }; +export type SmartRelayFeeQuoteJSON = { + fee_amount: string; + fee_address?: string; + payment_contract_address?: string; + relayer_address: string; + expiration: Date; + token: string; +} + +export type SmartRelayFeeQuote = { + feeAmount: string; + feeAddress?: string; + paymentContractAddress?: string; + relayerAddress: string; + expiration: Date; + token: string; +} + export type SwapVenueJSON = { name: string; chain_id: string;