ZeroKing is a trustless, tamper-proof, privacy-preserving chess game powered by zero-knowledge cryptography.
Built with:
- β SvelteKit (Frontend)
- β o1js & zkAppWorker (ZK Game Logic on Mina)
- β zkEmail (for .edu identity verification)
- β French Toast (for clean notifications)
- π .edu-only login via ZK email proof
- π Zero-Knowledge proof-verified chess engine
- βοΈ On-chain move validation with full game history
- π Resign or Draw triggers a visual game over screen
- πΌοΈ (Coming soon) NFT minting for victories and draws
- π Automatic redirect to home after game ends
src/
βββ routes/
β βββ +page.svelte # Landing Page with ZK Email Login
β βββ game/+page.svelte # Core Chess UI
βββ lib/
β βββ zkapp/ # zkApp client for Mina logic
β βββ components/ # Reusable Svelte components
β βββ utils/ # Minting, proof handling (WIP)
# 1. Install dependencies
npm install
# 2. Start the dev server
npm run dev
Youβll need:
- Node 18+
nargo
if building Noir circuits locally (for zkEmail proof generation)- A Mina wallet (Auro) to interact with the zkApp
- User enters
.edu
email - Generates a zkEmail proof (mocked for now)
- Connects wallet and enters game
- All moves are verified in a zk circuit (via o1js)
- On draw or resign:
- Outcome modal appears
- Auto-redirects to home
- (Soon) Mints NFT to reward the player(s)
Resign | Draw |
---|
- .edu-only entry via zkEmail
- Game logic via zkApp client
- Game-over modal + redirect
- NFT mint on game end
- ZK Proof verification inside
o1js
circuit - Tournament mode with sponsor badges
ZeroKing is built with tools and inspiration from: