pokerproof 🃏
A provably fair Texas Hold'em poker engine with cryptographic verification.
Features
- Provably Fair — Cryptographic commitment scheme ensures no manipulation
- Complete Texas Hold'em — Full game logic including blinds, betting rounds, side pots
- Deterministic — Seeded RNG for reproducible games
- No Dependencies on Runtime — Pure Rust, works anywhere
- Well Tested — 140+ tests covering edge cases
How Provably Fair Works
- Server commits to a random seed hash before the hand
- Players can verify the seed wasn't changed after seeing their cards
- Deck shuffle is deterministic from the seed
- Anyone can verify the shuffle was fair post-hand
use ;
// Server generates seed and commits hash
let seed = ; // In practice, use secure random
let commitment = sha256;
// After hand, players verify
assert!;
Quick Start
[]
= "0.1"
use ;
// Create a game
let config = GameConfig ;
let mut game = new;
// Add players
game.add_player?;
game.add_player?;
// Start the hand
game.start_hand?;
// Players take actions
game.handle_action?;
game.handle_action?;
// Game state is always accessible
println!;
println!;
Game Variants Supported
- ✅ No-Limit Texas Hold'em
- ✅ Pot-Limit Texas Hold'em
- ✅ Fixed-Limit Texas Hold'em
- ✅ Straddles (UTG, Button, Mississippi)
- ✅ Run It Twice
- ✅ Ante support
Architecture
pokerproof/
├── card.rs # Card, Rank, Suit types
├── deck.rs # Provably fair deck with commitment scheme
├── hand.rs # Hand evaluation (ranking, comparison)
├── game/ # Game state machine
│ ├── mod.rs # Core game logic
│ ├── config.rs # Game configuration
│ ├── state.rs # Game state
│ └── actions.rs # Player actions
└── player.rs # Player state
Testing
Includes property-based tests with proptest for edge cases.
Used By
- DeHouse — Free, no-rake online poker
License
MIT — use it for anything, commercial or otherwise.
Contributing
Issues and PRs welcome! See CONTRIBUTING.md.