import { type CheckoutHistoryItem, type DirectExecution } from '@funkit/api-base';
import React, { type ReactNode } from 'react';
import type { Address, Hex } from 'viem';
import { type MergedCheckoutHistoryItem } from '../utils/checkout';
import { type PurifiedCheckoutHistoryItem } from '../utils/purifyCheckoutHistoryItem';
export type { HistoricalCheckoutItem, ServerCheckoutConfig, } from '../domains/clientMetadata';
export type { FunkitCheckoutQuoteResult } from '../domains/quote';
interface FunkitCheckoutHistoryContextInterface {
    checkoutHistoryList: MergedCheckoutHistoryItem[];
    isCheckoutHistoryInited: boolean;
    isRefreshingCheckoutHistory: boolean;
    refreshCheckoutHistory(): void;
    startCheckoutHistoryListener(recipientAddr?: Address, expedited?: boolean): NodeJS.Timeout;
    stopCheckoutHistoryListener(cancelIntervalId?: NodeJS.Timeout): void;
}
export declare function FunkitCheckoutHistoryProvider({ children, }: {
    children: ReactNode;
}): React.JSX.Element;
export declare function useCheckoutHistoryContext(): FunkitCheckoutHistoryContextInterface;
/**
 * External hook to listen for checkout history every 5000ms
 * @param userId ID of the user (wallet address)
 * @returns PurifiedCheckoutHistoryItem[]
 */
export declare function useCheckoutsListenerByUserId(userId: string | undefined): {
    data?: PurifiedCheckoutHistoryItem[];
    isLoading: boolean;
};
/**
 * External hook to listen for checkout history every 5000ms
 * @param checkoutId ID of the checkout
 * @returns PurifiedCheckoutHistoryItem | null
 */
export declare function useCheckoutListenerByCheckoutId(checkoutId: Hex | undefined): {
    data?: PurifiedCheckoutHistoryItem | null;
    isLoading: boolean;
};
/**
 * Internal hook to handle post-checkout, PER-BACKEND-CHECKOUT ITEM.
 */
export declare const useFunkitPostCheckoutInternal: (checkoutId: string | undefined) => {
    isLoading: boolean;
    checkoutHistoryInfo: CheckoutHistoryItem | undefined;
    directExecutionInfo: DirectExecution | undefined;
};
