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