Skip to content

Tejaaswini/zeroking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

♟️ ZeroKing

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)

🚀 Features

  • 🎓 .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

🧱 Project Structure

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)

🧪 Local Development

# 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

🧠 How It Works

  1. User enters .edu email
  2. Generates a zkEmail proof (mocked for now)
  3. Connects wallet and enters game
  4. All moves are verified in a zk circuit (via o1js)
  5. On draw or resign:
    • Outcome modal appears
    • Auto-redirects to home
    • (Soon) Mints NFT to reward the player(s)

📸 Game Over Modal

Resign Draw

🛣️ Roadmap

  • .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:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published