import type { Abi, Address, Hex } from 'viem'; import type { ApiFunkitCheckoutQuoteResult } from './checkoutApi'; export interface ApiCheckoutClientMetadata { /** Unique identifier for frontend use only. */ id: string; /** Time of creation of the active checkout item. For frontend use only. **/ startTimestampMs: number; /** The final dollar value of the checkout. Derived from latestQuote. **/ finalDollarValue: null | number; latestQuote: ApiFunkitCheckoutQuoteResult | null; depositAddress: null | Address; initSettings: { config: ApiFunkitCheckoutConfig; }; selectedPaymentMethodInfo: ApiSelectedPaymentMethodInfo | null; selectedSourceAssetInfo: { address: Address | null; symbol: string | null; chainId: string; iconSrc: string | null; }; /** The evaluated result of initSettings.config.generateActionsParams at the point of checkout */ evaluatedActionsParams?: ApiFunkitCheckoutActionParams[]; isWithdrawal?: boolean; } export interface ApiSelectedPaymentMethodInfo { paymentMethod: string; title: string; description: string; meta?: object; } export interface BaseApiFunkitCheckoutActionParams { contractAddress: Address; value?: bigint; } interface ApiFunkitCheckoutActionParamsRawCalldata extends BaseApiFunkitCheckoutActionParams { rawCalldata: Hex; contractAbi?: never; functionName?: never; functionArgs?: never; } interface ApiFunkitCheckoutActionParamsContractAbi extends BaseApiFunkitCheckoutActionParams { rawCalldata?: never; contractAbi: Abi; functionName: string; functionArgs: unknown[]; } export type ApiFunkitCheckoutActionParams = ApiFunkitCheckoutActionParamsRawCalldata | ApiFunkitCheckoutActionParamsContractAbi; export interface ApiFunkitCheckoutConfig { /** **************************** * Api-related configurations * ******************************/ /** The ID of the chain where the checkout operation is to be performed. **/ targetChain: string; /** The wanted asset for the checkout operation. This can be either a chain native token (by specifying NATIVE_TOKEN) or an ERC-20 token (by specifying actual token address) on the target chain. **/ targetAsset: Address; /** The amount of wanted asset for the checkout operation (defaults to $100 equivalent). **/ targetAssetAmount?: number; /** The ticker information of the wanted asset for the checkout operation. e.g. USDC. **/ targetAssetTicker: string; /** @deprecated Timestamp (in milliseconds) after which the checkout should not be performed, and the funds will become rescuable. Min: 300000 (5 mins), Max: 3600000 (1 hour). **/ expirationTimestampMs?: number; /** Custom recipient address of the checkout. If specified, a different checkout flow will be executed. It is not recommended to set this unless the Fun.xyz team advises it. **/ customRecipient?: Address | string; /** List of contract action params **/ generateActionsParams?: string; } export {}; //# sourceMappingURL=clientMetadata.d.ts.map