import type { DirectExecution } from '@funkit/api-base'; import { type PurifiedCheckoutHistoryItem } from '@funkit/connect-core'; interface UseFunkitRecentDepositsParams { isVisible: boolean; fetchSize?: number; cutOffTimeMs?: number; /** * Optional filter to refine which deposits are returned. Pass a stable * reference (`useCallback`) — an unstable one recomputes the merge each render. */ memoizedFilterFunc?: (de: DirectExecution) => boolean; } interface UseFunkitRecentDepositsImplParams extends UseFunkitRecentDepositsParams { apiKey: string; userId: string; refreshIntervalMs: number; } /** * Fetch the current user's recent deposits, polling the funkit server. Mirrors * `@funkit/connect`'s `useFunkitRecentDeposits`. * * **Requirements**: must be used inside `` — it reads the * apiKey/userId configured there and the shared refresh interval. The `'0x'` * sentinel (no wallet / no externalUserId) disables polling. * * @returns `{ data }` — purified deposit rows, or `undefined` while loading. * * @example * ```tsx * const { data: recentDeposits } = useFunkitRecentDeposits({ * isVisible: true, * fetchSize: 10, * cutOffTimeMs: 24 * 60 * 60 * 1000, // last 24h * }) * ``` */ export declare function useFunkitRecentDeposits(query: UseFunkitRecentDepositsParams): { data: PurifiedCheckoutHistoryItem[] | undefined; }; /** * Explicit-params variant of `useFunkitRecentDeposits`. Mirrors * `@funkit/connect`'s `useFunkitRecentDepositsImpl`. * * **Requirements**: does NOT require `` — the host passes * identity and the refresh interval itself. Use it when polling outside the * provider hierarchy, or for a user other than the configured one. * * @returns `{ data }` — purified deposit rows, or `undefined` while loading. * * @example * ```tsx * const { data: recentDeposits } = useFunkitRecentDepositsImpl({ * isVisible: true, * apiKey: 'your-api-key', * userId: 'funkit|external-user-42', * refreshIntervalMs: 5000, * fetchSize: 10, * }) * ``` */ export declare function useFunkitRecentDepositsImpl({ isVisible, fetchSize, cutOffTimeMs, memoizedFilterFunc, apiKey, userId, refreshIntervalMs, }: UseFunkitRecentDepositsImplParams): { data: PurifiedCheckoutHistoryItem[] | undefined; }; export {}; //# sourceMappingURL=useRecentDeposits.d.ts.map