# Provably fair > Seed commitment, the hash-to-float derivation, rotation and verification, and versioned mathematics. Source: https://casinoapipro.com/docs/provably-fair Every outcome is derived from a hash the player can recompute. We commit to a server seed before play by publishing its hash, and reveal the seed when it is rotated — so a player can check, after the fact, that we did not choose the outcome once we knew their bet. ## The scheme - Server seed — secret, ours, revealed on rotation. - Client seed — the player's, changeable at any time. - Nonce — a counter, incremented once per round. ```js const hash = sha256(\ ``` That single float drives the round. What it selects — which tile is a mine, where the multiplier stops — is the game's own mathematics, versioned per release. ## The commitment Before a round, the launcher can read the current commitment: the _hash_ of the server seed, never the seed. `GET /v1/game/state` — auth: game-launcher ```json { "fairness": { "server_seed_hash": "9c1185a5c5e9fc54612808977ee8f548b2258d31…", "client_seed": "player-chosen-or-generated", "nonce": 41 } } ``` ## Rotating and verifying `POST /v1/game/seed/rotate` — auth: game-launcher Rotation reveals the old server seed and commits to a new one in the same response. With the revealed seed the player can recompute every round played under it. ```json { "revealed": { "server_seed": "8f14e45fceea167a5a36dedd4bea2543…", "server_seed_hash": "9c1185a5c5e9fc54612808977ee8f548…", "rounds": 41 }, "next": { "server_seed_hash": "b6589fc6ab0dc82cf12099d1c2d40ab9…" } } ``` > **What the player checks** > > That `sha256(revealed.server_seed)` equals the hash committed _before_ they played. If it matches, the seed could not have been chosen after seeing their bets. ## Setting a client seed `POST /v1/game/seed/client` — auth: game-launcher A player who supplies their own client seed removes any doubt about our influence over the input. Setting one rotates the nonce back to zero. ## Versioned mathematics Every game release is versioned, and each round records the version it was played under. A change to a payout table is a new release, never an edit — so a round played last year can still be verified against the exact mathematics in force at the time. | Name | Type | Meaning | | --- | --- | --- | | `game_version` | string | Recorded on the round. What a regulator asks for first. | | `server_seed_hash` | string | The commitment in force when the round was played. | | `nonce` | integer | This round’s position in the seed’s sequence. | ## Where the randomness comes from Server seeds are drawn from the operating system's CSPRNG. Nothing in the engine calls a seeded or time-based generator, and the engine has no access to a player's balance or stake when it computes an outcome — the mathematics and the money are separate layers by design.