A privacy-preserving credential verification platform built on Ethereum using Zero-Knowledge Proofs. Issuers can issue digital credentials on-chain, holders can prove ownership without revealing sensitive data, and verifiers can validate credentials trustlessly.
- Issuer Dashboard โ Register as a trusted authority and issue credentials on-chain
- Holder Dashboard โ View credentials and generate zero-knowledge proofs
- Verifier Dashboard โ Verify proofs on-chain without accessing personal data
- ZK Proof Generation โ Prove credential ownership without revealing private data
- On-Chain Verification โ Smart contract validates proofs cryptographically
- MetaMask Integration โ Auto-connects to the correct blockchain network
- Immutable Audit Trail โ Every verification is recorded on the blockchain
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ React Frontend โ
โ (Issuer / Holder / Verifier) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ ethers.js + MetaMask
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Ethereum Blockchain โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ CredentialRegistry.sol โ โ
โ โ (Issue, Revoke, Verify) โ โ
โ โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ โ
โ โ calls โ
โ โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโ โ
โ โ Groth16Verifier.sol โ โ
โ โ (ZK Proof Verification) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
blockchain/
โโโ contracts/
โ โโโ CredentialRegistry.sol # Credential management + ZK verification
โ โโโ Groth16Verifier.sol # ZK-SNARK proof verifier
โโโ circuits/
โ โโโ credential.circom # Circom ZK circuit (Poseidon hash)
โโโ scripts/
โ โโโ deploy.js # Contract deployment + ABI export
โโโ test/
โ โโโ CredentialRegistry.test.js
โโโ frontend/
โ โโโ src/
โ โโโ components/ # Issuer, Holder, Verifier dashboards
โ โโโ utils/ # WalletContext, zkUtils
โ โโโ App.js # Router + contract loading
โโโ hardhat.config.js
โโโ package.json
cd blockchain
npm install
cd frontend
npm install
cd ..npx hardhat nodenpx hardhat run scripts/deploy.js --network localhostcd frontend
npm startThe app auto-switches MetaMask to the Hardhat network. Just click Connect and approve.
- Network: Hardhat Local
- RPC URL:
http://127.0.0.1:8545 - Chain ID:
31337
1. ISSUER โ Register โ Issue credential (hash stored on-chain)
2. HOLDER โ Enter secret + data โ Generate ZK Proof โ Copy/Download
3. VERIFIER โ Paste proof JSON โ Verify on-chain โ Valid โ / Invalid โ
Key Concept: The verifier confirms the credential is authentic without ever seeing the credential data. Only a cryptographic proof is verified.
Holder knows: secret + credentialData
โ
Computes: hash = Poseidon(secret, credentialData)
โ
Generates: ZK Proof โ "I know the preimage of this hash"
โ
Verifier: Checks proof on-chain โ Valid/Invalid
(never learns secret or credentialData)
| Function | Description |
|---|---|
selfRegisterIssuer(name) |
Register as a credential issuer |
issueCredential(hash, holder, type, uri) |
Issue a credential on-chain |
revokeCredential(hash) |
Revoke a credential |
verifyCredentialProof(hash, a, b, c, input) |
Verify a ZK proof on-chain |
getHolderCredentials(address) |
Get all credentials for a holder |
Verifies that ZK proof elements are cryptographically linked, ensuring forged proofs are rejected.
npx hardhat test CredentialRegistry
โ should auto-register deployer as issuer
โ should allow self-registration as issuer
โ should prevent duplicate issuer registration
โ should issue a credential
โ should prevent non-issuers from issuing
โ should prevent duplicate credentials
โ should track holder credentials
โ should allow issuer to revoke
โ should prevent non-issuer from revoking
9 passing
| Technology | Purpose |
|---|---|
| Solidity 0.8.19 | Smart contracts |
| Circom 2.0 | ZK circuit definition |
| Hardhat | Ethereum dev framework |
| React 18 | Frontend UI |
| Ethers.js v6 | Blockchain interaction |
| MetaMask | Wallet & transaction signing |
| SnarkJS | ZK proof generation |
MIT
Built with โค๏ธ using Ethereum, Zero-Knowledge Proofs, and React