UNPKG

@azuro-org/sdk

Version:

One-stop solution for building betting dApps on the Azuro Protocol.

25 lines (24 loc) 726 B
import { GameState } from '@azuro-org/toolkit'; export type UseGameStateProps = { gameId: string; initialState: GameState; }; /** * Watch real-time game state updates (e.g., Prematch, Live, Finished). * Subscribes to game updates via websocket and tracks state changes. * * Automatically skips subscription if the game is already finished. * * - Docs: https://gem.azuro.org/hub/apps/sdk/watch/useGameState * * @example * import { useGameState, GameState } from '@azuro-org/sdk' * * const { data: state } = useGameState({ * gameId: game.gameId, * initialState: GameState.Prematch * }) * */ export declare const useGameState: ({ gameId, initialState }: UseGameStateProps) => { data: GameState; };