Decentralized, privacy-first Bitcoin casino built on Nostr + Cashu ecash.
No KYC. No tracking. Provably fair. Your keys, your sats.
0xPrivacy Casino is a fully client-side, decentralized casino that runs on the Nostr protocol and uses Cashu ecash tokens for payments. Every game outcome is provably fair via SHA-256 seeded randomness, and all results are published as Nostr events (kind 8867) for public auditability.
https://0xCasino.shakespeare.wtf
| Game | Type | House Edge | RTP | Min Bet |
|---|---|---|---|---|
| Slots | 3-reel slot machine | 2.5% | 97.5% | 100 sats |
| Dice | Over/under roll | 2.5% | 97.5% | 100 sats |
| Roulette | European single-zero | 2.5% | 97.5% | 100 sats |
| Blackjack | Classic 21 | 2.5% | 97.5% | 100 sats |
| Coin Flip | Heads or tails | 2.5% | 97.5% | 100 sats |
- Nostr Login - No email, no passwords, no KYC. Sign in with your Nostr key.
- Cashu Ecash - Chaumian ecash tokens are unlinkable. The mint cannot connect deposits to withdrawals.
- Client-Side - All game logic runs in your browser. No server-side house advantage manipulation.
- Provably Fair - Every outcome uses
SHA-256(serverSeed:clientSeed:nonce)and is published to Nostr for anyone to verify.
- Game results published as kind 8867 events (see NIP.md)
- Results are tagged with
t:casinoand the specific game type for relay-level filtering - Full provably-fair seed data included in every event
- Human-readable
alttags for non-supporting clients
- Built-in client-side Cashu wallet with proof management
- Power-of-2 denomination splitting (standard Cashu protocol)
- Support for multiple mints (Minibits, Coinos, LNbits)
- Deposit and withdraw via Cashu tokens
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| TypeScript | Type-safe development |
| TailwindCSS 3 | Utility-first styling |
| Vite | Build tooling |
| shadcn/ui | Accessible UI components |
| Nostrify | Nostr protocol integration |
| TanStack Query | Data fetching and caching |
| React Router | Client-side routing |
| Web Crypto API | Provably-fair SHA-256 RNG |
All wagers carry a transparent 2.5% total rake:
| Component | Percentage | Purpose |
|---|---|---|
| House Edge | 2.0% | Funds the prize pool (player winnings) |
| Dev Fund | 0.5% | Funds continued development |
| Total | 2.5% |
The prize pool and dev fund balances are displayed transparently in the UI.
src/
components/
casino/ # GameLayout, WalletPanel
games/ # SlotMachine, DiceRoll, Roulette, Blackjack, CoinFlip
auth/ # LoginArea, LoginDialog, SignupDialog
ui/ # shadcn/ui components
contexts/
CashuContext.tsx # Cashu wallet state management
AppContext.ts # Global app configuration
NWCContext.tsx # Nostr Wallet Connect
hooks/
useCasinoEvents.ts # Nostr event publishing & querying (kind 8867)
useCurrentUser.ts # Current logged-in user
useAuthor.ts # Profile data fetching
useNostrPublish.ts # Event publishing
lib/
cashu.ts # Cashu wallet implementation & provably-fair RNG
pages/
CasinoDashboard.tsx # Main landing page
This project defines kind 8867 for casino game results. See NIP.md for the complete specification.
{
"kind": 8867,
"content": "{\"game\":\"slots\",\"bet\":1000,\"payout\":5000,...}",
"tags": [
["t", "casino"],
["t", "slots"],
["t", "win"],
["amount", "1000"],
["payout", "5000"],
["alt", "0xPrivacy Casino - slots: ... (won 5000 sats)"]
]
}See GUIDE.md for detailed setup and development instructions.
- Clone the repository
- Open in Shakespeare or run locally with Vite
- Log in with your Nostr key
- Initialize your Cashu wallet
- Start playing!
| NIP | Title | Relevance |
|---|---|---|
| NIP-01 | Basic Protocol | Core event structure |
| NIP-07 | Browser Signer | Login via browser extension |
| NIP-60 | Cashu Wallet | Ecash wallet standard |
| NIP-61 | Nutzaps | Future: zap-based deposits |
| NIP-65 | Relay List | Relay management |
| NIP-87 | Cashu Discovery | Mint discoverability |
Contributions are welcome! Please open an issue or submit a pull request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Live App: https://0xCasino.shakespeare.wtf
- 0xPrivacy: https://0xprivacy.online
- Built with: Shakespeare