import { type FeeBreakdownV2 } from '@funkit/api-base'; import type { CheckoutQuoteResponse } from '@funkit/utils'; import { LoginType } from '../providers/GeneralWalletProvider'; import type { Config } from '../wagmi/hooks'; import type { FunkitActiveCheckoutItem } from '../providers/FunkitCheckoutContext'; import { PaymentMethod, type PaymentMethodInfo } from './paymentMethods'; interface BaseCheckoutFees { paymentMethod: PaymentMethod; marketMakerFeeUsd: number; liquidityProviderFeeUsd: number; totalFeesUsd: number; /** does not include the gas fee since it can be in a * different token than the source token */ totalFeesTokenWithoutGas: number; } interface WalletCheckoutFees extends BaseCheckoutFees { paymentMethod: PaymentMethod.ACCOUNT_BALANCE; eoaWalletFeeToken: number; nativeCurrencySymbol: string; eoaWalletFeeUsd: number; } interface CardCheckoutFees extends BaseCheckoutFees { paymentMethod: PaymentMethod.CARD; cardProcessingFeeUsd: number; moonpayCostUsd: number; } export type CheckoutFees = WalletCheckoutFees | CardCheckoutFees; interface EvaluateFeeBreakdownItem { baseQuote: CheckoutQuoteResponse; selectedSourceAssetInfo: FunkitActiveCheckoutItem['selectedSourceAssetInfo']; newPaymentMethodInfo: PaymentMethodInfo; wagmiConfig: Config; apiKey: string; loginType: LoginType; isWithdrawal?: boolean; } export declare function evaluateFeeBreakdown(evalItem: EvaluateFeeBreakdownItem): Promise<{ fees: CheckoutFees; }>; /** * The quote's expected loss in percent, when it exceeds `thresholdPercent`; * otherwise undefined. * * - Sums swap impact and max slippage, counting a missing field as 0 as the * fee rows do. The app fee and network cost are fees rather than slippage * or execution loss, so they stay out. * - Leaves out `totalImpact`, which adds up to 1.25% that the backend moves * into the displayed exchange rate. * - Rounds to the two decimals the warning shows, so it never reads "5.00%". */ export declare function getHighPriceImpactPercent(feeBreakdown: Partial> | undefined, thresholdPercent: number): number | undefined; export {};