/** * Create a standard 52-card deck * Returns array of integer card codes (0-51) */ export declare function createDeck(): number[]; /** * Cryptographically secure RNG using Node.js crypto module. * * **Fail-closed design:** Throws an error if no secure RNG source is available. * This function NEVER falls back to Math.random(). * * In Node.js, uses `crypto.randomBytes`. Outside Node.js (or if crypto is * unavailable), throws an error instructing the caller to provide a * `randomProvider` in the table config. */ export declare function getSecureRandom(): () => number; /** * Shuffle deck using Fisher-Yates algorithm with injectable RNG. * * **Fail-closed design:** When no `rng` is supplied, uses `getSecureRandom()` * which throws if no cryptographically secure source is available. It NEVER * falls back to `Math.random()`. * * @param deck - Deck to shuffle (not modified, returns new array) * @param rng - Optional RNG function returning values in [0, 1). * For deterministic tests, pass a seeded RNG. * When omitted, `getSecureRandom()` is used (Node crypto). * @returns New shuffled deck * * @example * ```typescript * // Production (Node): uses crypto.randomBytes via getSecureRandom() * const deck = shuffle(createDeck()); * * // Production (Node): explicit secure RNG * import { randomBytes } from 'crypto'; * const rng = () => randomBytes(4).readUInt32BE(0) / 0x100000000; * const deck = shuffle(createDeck(), rng); * * // Deterministic testing * const seeded = createSeededRandom(12345); * const deck = shuffle(createDeck(), seeded); * ``` */ export declare function shuffle(deck: readonly number[], rng?: () => number): number[]; /** * Deal cards from deck * * @param deck - Deck to deal from * @param count - Number of cards to deal * @returns Tuple of [dealt cards, remaining deck] */ export declare function dealCards(deck: readonly number[], count: number): [cards: number[], remaining: number[]]; /** * Burn one card and deal specified number * (Standard poker procedure) * * @param deck - Deck to deal from * @param count - Number of cards to deal after burn * @returns Tuple of [dealt cards, remaining deck] */ export declare function burnAndDeal(deck: readonly number[], count: number): [cards: number[], remaining: number[]];