import { usePublicClient } from "wagmi"; import { GameResult } from "../types/types"; import type { WatchTarget } from "./types"; interface UseBetResultWatcherProps { watchParams: WatchTarget | null; publicClient: ReturnType | null; enabled: boolean; } type BetResultWatcherStatus = "idle" | "listening" | "fallback_listening" | "success" | "error" | "timeout"; interface BetResultWatcherOutput { gameResult: GameResult | null; status: BetResultWatcherStatus; error: Error | null; reset: () => void; } /** * Watches for bet result events from casino contracts. * Uses primary event subscription with automatic fallback to polling if filters fail. * * @param watchParams - Contract address, event details, and bet ID to watch * @param publicClient - Viem public client for blockchain interactions * @param enabled - Whether the watcher should be active * @returns Game result data, watcher status, error state, and reset function * * @example * ```ts * const { gameResult, status } = useBetResultWatcher({ * watchParams: { contractAddress, betId, gameType, eventAbi, eventName }, * publicClient, * enabled: betStatus === 'awaiting_result' * }) * ``` */ export declare function useBetResultWatcher({ watchParams, publicClient, enabled, }: UseBetResultWatcherProps): BetResultWatcherOutput; export {};