import { ActionRecord, GameState, Player, Pot, TableConfig, Winner } from "@pokertools/types"; /** * Snapshot format (JSON-serializable) */ export interface Snapshot { readonly config: TableConfig; readonly players: Array; readonly maxPlayers: number; readonly handNumber: number; readonly buttonSeat: number | null; readonly deck: number[]; readonly board: string[]; readonly street: string; readonly pots: Pot[]; readonly currentBets: Record; readonly minRaise: number; readonly lastRaiseAmount: number; readonly actionTo: number | null; readonly lastAggressorSeat: number | null; readonly activePlayers: number[]; readonly winners: Winner[] | null; readonly rakeThisHand: number; readonly smallBlind: number; readonly bigBlind: number; readonly ante: number; readonly blindLevel: number; readonly timeBanks: Record; readonly timeBankActiveSeat: number | null; readonly actionHistory: ActionRecord[]; readonly previousStates: Snapshot[]; readonly initialChips?: number; readonly timestamp: number; readonly handId: string; } /** * Create JSON-serializable snapshot of game state * Converts Maps to objects and truncates history */ export declare function createSnapshot(state: GameState): Snapshot; /** * Restore game state from snapshot */ export declare function restoreFromSnapshot(snapshot: Snapshot): GameState; /** * Serialize snapshot to JSON string */ export declare function serializeSnapshot(snapshot: Snapshot): string; /** * Deserialize JSON string to snapshot */ export declare function deserializeSnapshot(json: string): Snapshot; /** * Validate snapshot integrity */ export declare function validateSnapshot(snapshot: Snapshot): boolean;