
Build casino games with a single HTML file.
You handle UI and game design. GeeWin handles randomness, balances, payouts, and provably fair verification.
How It Works
Your game runs inside a sandboxed iframe on the GeeWin platform. All communication happens via the browser's postMessage API — your game sends bet/action messages to the platform, and the platform responds with results.
Your game never touches real money, balances, or RNG — the platform handles all of that server-side.
- 1. An HTML file with your game UI
- 2. A
GAME_CONFIGdeclaring which primitive + settings - 3.
postMessagecalls to place bets and get results
- ✓ Provably fair RNG
- ✓ 97% RTP enforcement
- ✓ Balance management & payouts
- ✓ Session management
Quick Start
Every game is an HTML file with two things: a config and postMessage communication.
1<script>2 // 1. Declare your game config3 window.GAME_CONFIG = {4 primitive: 'one-shot',5 multipliers: [0, 0.5, 1, 2, 5, 10, 50]6 };7
8 // 2. Place a bet9 function bet() {10 parent.postMessage({11 type: 'bet',12 id: Date.now(),13 stake: window.GAME_STAKE,14 currency: window.GAME_CURRENCY15 }, '*');16 }17
18 // 3. Get the result (matched by id)19 window.addEventListener('message', (e) => {20 if (e.data.type === 'betResult' && e.data.id) {21 const { multiplier, payout, result } = e.data.result;22 // result = 'WIN' | 'LOSS' | 'PUSH'23 // Animate your game with the result24 }25 });26
27 // 4. Tell the platform you're ready (required!)28 parent.postMessage({ type: 'gameReady' }, '*');29</script>Choose a Primitive
Each primitive handles a different type of game. Pick the one that fits your game design.
One Shot
Single random outcome per bet
Path
Pick tiles, avoid hazards, cash out anytime
Multiplier
Rising multiplier with random crash
PVP Escrow
Player vs player with escrow
State Machine
Multi-step games with complex logic
Quick Reference
| Primitive | Bet Type | Example Games |
|---|---|---|
| One Shot | Single outcome per bet | Slots, dice, wheel, plinko |
| Path | Pick tiles, cash out anytime | Mines, towers |
| Multiplier | Rising value, cash out before crash | Crash, aviator, moon |
| PVP Escrow | Player vs player | RPS, coin flip duels |
| State Machine | Multi-step with actions | Blackjack, poker, craps |
Platform Variables
The platform injects these into your game's window before it loads:
| Variable | Type | Description |
|---|---|---|
| window.GAME_STAKE | number | Bet amount in crypto units (set by player in platform UI) |
| window.GAME_STAKE_USD | number | Bet amount in USD |
| window.GAME_CURRENCY | string | 'ETH' | 'SOL' | 'USDT' |
| window.TEST_MODE | boolean | true when in preview/test mode |
| window.PREVIEW_MODE | boolean | true when game is running in the preview sandbox |
| window.GAME_CONFIG_FOR_API | object | Config formatted for API (preview only — include in postMessages so the platform can validate without an upload) |