A blockchain-based Panagram (anagram puzzle) game that leverages zero-knowledge proofs (ZKPs) for privacy and fairness. The smart contracts are written in Solidity, while zero-knowledge circuits and proof generation are handled using Noir and Barretenberg. This setup allows users to prove they have solved a puzzle without revealing the solution, ensuring both transparency and privacy on-chain.
- Node.js
- Solidity
- Noir
- Barretenberg
- Hardhat or Foundry (for Solidity development)
- Rust (for some ZKP tooling)
# For Solidity contracts (example with Hardhat)
cd contract
npm install
# For Noir circuits
cd ../
nargo install# Compile Solidity contracts
cd contract
npx hardhat compile
# Compile Noir circuits
cd ../
nargo build- Use Noir and Barretenberg to generate proofs and verification keys for your ZKP circuits.
- Integrate the verification key into your Solidity contract for on-chain verification.
cd src
# Add your backend/frontend run instructions here
# e.g., npm start, cargo run, etc.- User submits a solution to the Panagram puzzle.
- A ZKP is generated off-chain (using Noir/Barretenberg) to prove the solution is correct without revealing it.
- The proof is sent to the smart contract, which verifies it using the embedded verification key.
- If valid, the contract updates the game state and rewards the user.
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/YourFeature) - Create a new Pull Request
This project is licensed under the MIT License.
References: