Randomness your players can verify.
FairDice gives game servers seed-based dice, card shuffles and lottery draws that run fully offline, then turns every match into a link anyone can open to check that nothing was rigged.

Commit. Play. Reveal.
The classic commit-reveal scheme, packaged so that one link proves a whole match.

Commit
Before the game your server creates a FairDice and shows players the SHA-256 fingerprint of its secret seed. From now on the seed cannot change.

Play
Every roll, shuffle or draw is computed from the seed, the players' seed and a counter. No network, no latency: it runs inside your game server.

Reveal
After the game the SDK packs the seed and the list of draws into one link. Anyone can open it and recompute every result in their own browser.
Everything a fair game needs
Libraries for your backend, tools for players, and public infrastructure for lotteries. All free.
SDK for JS, C# & Python
Zero-dependency libraries for Node, browsers, .NET and Python. The same seeds give the same results in every language.
OpenProof verification
Open a proof link and recompute every roll locally. Checks the commitment, notary timestamps and beacon seeds.
OpenShared dice rooms
Send a link, roll together. Remote backgammon, board games and tabletop RPGs with dice nobody at the table controls.
OpenPublic lottery draws
Scheduled giveaways and lotteries. The entry list is frozen first; winners come from a beacon value that did not exist yet.
OpenRandomness beacon
A new public random value every minute, fixed in advance by a hash chain and mixed with drand. Nobody can predict or pick it.
OpenInstant roller
Fair dice, cards, coins and lotto numbers right in your browser, with a proof link for every session.
OpenCommitment notary
Timestamp a commitment before the match so the order of events can be proven later.
OpenHTTP API & embeds
Verify proofs, read the beacon, run draws and embed verification widgets from any stack.
OpenA few lines in your game server
Install the SDK, roll as usual, share the link when the match ends.
// npm i https://fairdice.ir/sdk/fairdice-latest.tgz
import { FairDice } from 'fairdice';
// 1. Before the match: create the dice, show players the commitment
const dice = new FairDice({ dice: '2d6', game: 'Backgammon', meta: { match: 'm-1842' } });
broadcast({ commitment: dice.commitment });
// optional: players send their own seeds before the first roll
dice.setPlayerSeeds([whiteSeed, blackSeed]);
// 2. During the match: roll offline, as often as you like
const [a, b] = dice.roll(); // e.g. [6, 6]
// 3. After the match: one link proves every roll
broadcast({ proof: dice.url() }); // https://fairdice.ir/v/eyJ2Ijox...Built for real games
Presets for the games people actually play, and primitives for everything else.
Questions
Can the operator cheat by choosing a lucky seed?
The commitment is shown before any player seed is known. Players add their own seed (or a future beacon value is used), so the operator cannot search for a seed that favours them, and cannot swap it afterwards without the hash changing.
Does fairdice.ir see my game data?
No. The SDK runs entirely inside your server and never calls us. Proof links are verified in the visitor's browser. Online features (rooms, draws, notary, short links) are optional.
Is it really free?
Yes. Every service on fairdice.ir is free for now: SDKs, verification, rooms, draws, beacon, notary and API.
What if fairdice.ir disappears?
Proofs do not depend on us. The protocol is documented byte by byte, test vectors are public and the SDKs can verify any proof offline.
Which games can use it?
Anything with randomness: dice games, card games (Hokm, poker, blackjack, durak), dominoes, roulette, bingo, lotto, loot boxes, matchmaking, tournament brackets and procedural map seeds.



















