import { BigNumber } from "bignumber.js"; import type { BridgeAsset, ExchangeRate, GenericQuoteRequest, L1GasFees, Quote, QuoteMetadata, QuoteResponseV1, NonEvmFees, TxData } from "../types.mjs"; import { FeatureId } from "../types.mjs"; export declare const isValidQuoteRequest: (partialRequest: Partial, requireAmount?: boolean) => partialRequest is GenericQuoteRequest; export declare const isValidBatchSellQuoteRequest: (quoteRequests: Partial[], requireAmount?: boolean) => quoteRequests is GenericQuoteRequest[]; /** * Generates a pseudo-unique string that identifies each quote by aggregator, bridge, and steps * * @param quote - The quote to generate an identifier for * @returns A pseudo-unique string that identifies the quote */ export declare const getQuoteIdentifier: (quote: QuoteResponseV1['quote']) => string; export declare const calcNonEvmTotalNetworkFee: (bridgeQuote: QuoteResponseV1 & NonEvmFees, { exchangeRate, usdExchangeRate }: ExchangeRate) => { amount: string; valueInCurrency: string | null; usd: string | null; }; export declare const calcToAmount: (destTokenAmount: string, destAsset: BridgeAsset, { exchangeRate, usdExchangeRate }: ExchangeRate) => { amount: string; valueInCurrency: string | null; usd: string | null; }; export declare const calcSentAmount: ({ srcTokenAmount, srcAsset, feeData, intent }: Quote, { exchangeRate, usdExchangeRate }: ExchangeRate) => { amount: string; valueInCurrency: string | null; usd: string | null; }; export declare const calcBatchFees: (amount: string, asset: BridgeAsset, { exchangeRate, usdExchangeRate }: ExchangeRate) => { amount: string; valueInCurrency: string | null; usd: string | null; asset: { symbol: string; chainId: number; address: string; assetId: `${string}:${string}/${string}:${string}`; name: string; decimals: number; icon?: string | null | undefined; iconUrl?: string | null | undefined; }; }; export declare const calcRelayerFee: (quoteResponse: QuoteResponseV1, { exchangeRate, usdExchangeRate }: ExchangeRate) => { amount: BigNumber; valueInCurrency: BigNumber | null; usd: BigNumber | null; }; export declare const calcEstimatedAndMaxTotalGasFee: ({ bridgeQuote: { approval, trade, l1GasFeesInHexWei, resetApproval }, feePerGasInDecGwei, maxFeePerGasInDecGwei, exchangeRate: nativeToDisplayCurrencyExchangeRate, usdExchangeRate: nativeToUsdExchangeRate, }: { bridgeQuote: QuoteResponseV1 & L1GasFees; maxFeePerGasInDecGwei?: string | undefined; feePerGasInDecGwei?: string | undefined; } & ExchangeRate) => QuoteMetadata['gasFee']; /** * Calculates the total estimated network fees for the bridge transaction * * @param gasFee - The gas fee for the bridge transaction * @param gasFee.total - The fee to display to the user. If not available, this is equal to the gasLimit (total) * @param relayerFee - The relayer fee paid to bridge providers * @returns The total estimated network fee for the bridge transaction, including the relayer fee paid to bridge providers */ export declare const calcTotalEstimatedNetworkFee: ({ total: gasFeeToDisplay }: ReturnType, relayerFee: ReturnType) => { amount: string; valueInCurrency: string | null; usd: string | null; }; export declare const calcTotalMaxNetworkFee: (gasFee: ReturnType, relayerFee: ReturnType) => { amount: string; valueInCurrency: string | null; usd: string | null; }; export declare const calcIncludedTxFees: ({ gasIncluded, gasIncluded7702, srcAsset, feeData: { txFee } }: Quote, srcTokenExchangeRate: ExchangeRate, destTokenExchangeRate: ExchangeRate) => { amount: string; valueInCurrency: string | null; usd: string | null; } | null; export declare const calcAdjustedReturn: (toTokenAmount: ReturnType, totalEstimatedNetworkFee: ReturnType, { feeData: { txFee }, destAsset: { assetId: destAssetId } }: Quote) => { valueInCurrency: string | null; usd: string | null; }; export declare const calcSwapRate: (sentAmount: string, destTokenAmount: string) => string; export declare const calcCost: (adjustedReturn: ReturnType, sentAmount: ReturnType) => { valueInCurrency: string | null; usd: string | null; }; /** * Calculates the slippage absolute value percentage based on the adjusted return and sent amount. * * @param adjustedReturn - Adjusted return value * @param sentAmount - Sent amount value * @returns the slippage in percentage */ export declare const calcSlippagePercentage: (adjustedReturn: ReturnType, sentAmount: ReturnType) => string | null; export declare const formatEtaInMinutes: (estimatedProcessingTimeInSeconds: number) => string; export declare const sortQuotes: (quotes: QuoteResponseV1[], featureId: FeatureId | null) => QuoteResponseV1[]; //# sourceMappingURL=quote.d.mts.map