Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CodeAXwOrlD/ProofX-Protocol

Repository files navigation

ProofX Protocol

Hackathon-ready compliance verification on Ethereum with Keychain authorization.


πŸš€ Quick Start

# 1. Install all dependencies
npm run setup

# 2. Configure environment (single file for everything)
cp .env.example .env
# Edit .env with your settings

# 3. Run everything
npm run dev

This starts:

  • Frontend on http://localhost:3000
  • Prover Service on http://localhost:3001

βš™οΈ Environment Variables (Single .env file)

# Contract address (set after deployment)
NEXT_PUBLIC_CONTRACT_ADDRESS=0x...

# Prover service
NEXT_PUBLIC_PROVER_URL=http://localhost:3001
PROVER_PORT=3001

# Deployment (your wallet key)
PRIVATE_KEY=your_private_key_without_0x
SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/YOUR_KEY

πŸ“¦ Available Scripts

Command Description
npm run dev Run frontend + prover together
npm run dev:frontend Run frontend only
npm run prover Run prover service only
npm run build Build production frontend
npm run setup Install all dependencies
npm run compile Compile smart contracts
npm run deploy:sepolia Deploy to Sepolia testnet
npm run deploy:amoy Deploy to Polygon Amoy

πŸ”§ Project Structure

ProofX/
β”œβ”€β”€ app/                    # Next.js pages
β”‚   └── prototype/          # Demo page
β”œβ”€β”€ lib/                    # Web3 integration
β”‚   β”œβ”€β”€ config.ts          # Contract ABI & addresses
β”‚   β”œβ”€β”€ web3-context.tsx   # Wallet connection
β”‚   └── useProofX.ts       # Proof flow orchestration
β”œβ”€β”€ prover/                 # Backend prover service
β”‚   └── server.js          # Express API
β”œβ”€β”€ blockchain/             # Smart contracts
β”‚   β”œβ”€β”€ contracts/         # Solidity files
β”‚   └── scripts/           # Deployment scripts
└── docs/                   # Documentation

πŸ” Keychain Integration & ZK Privacy

ProofX uses Keychain as its cryptographic authorization layer and Groth16 for privacy.

What's Real:

  • βœ… Groth16 Zero-Knowledge Proofs (Real circuit execution)
  • βœ… Keychain Signing (EIP-191 personal_sign)
  • βœ… Blockchain Verification (Sepolia/Amoy)
  • βœ… Trusted Issuers Registry (On-chain verification)

Trusted Issuers Supported:

  • πŸ›οΈ UIDAI (Aadhaar/eKYC with XML DSig)
  • 🏦 Central Banks (RBI, Federal Reserve)
  • 🏒 Commercial Banks (HDFC, SBI)
  • πŸ“Š Credit Bureaus (CIBIL)

🎯 Demo Flow

  1. Connect Wallet β€” MetaMask on Sepolia
  2. Select Verification β€” KYC, Capital, Bank, etc.
  3. Upload Document β€” Upload real JSON (e.g., Aadhaar) or use sample
  4. Generate Proof β€” Client-side ZK proof generation
  5. Keychain Authorization β€” Sign with your key
  6. Submit to Blockchain β€” Real transaction
  7. Download Proof β€” Export standardized JSON proof

πŸ“‹ Environment Variables

Create .env in the root (see .env.example):

# Contract Address (Sepolia)
NEXT_PUBLIC_CONTRACT_ADDRESS=0x3146ee369B979c2f776C3A74790b228C6BfE0673

# Prover Service
NEXT_PUBLIC_PROVER_URL=http://localhost:3001

# Blockchain (for deployment)
PRIVATE_KEY=your_private_key
RPC_URL=https://sepolia.infura.io/v3/...

πŸ› οΈ Deployment

# 1. Install dependencies
npm run setup

# 2. Compile circuits (optional, artifacts included)
# npm run compile:circuits

# 3. Deploy contracts
npm run deploy:sepolia

# 4. Start app
npm run dev

About

ProofX Protocol πŸ›‘οΈ Top 40 Finalist (Top 0.4%) / 10k+ A privacy-first compliance layer using Zero-Knowledge Proofs (ZK-SNARKs). Institutions can mathematically prove solvency or tax compliance on-chain (e.g., "Assets > Liabilities") without revealing sensitive balance sheets. Decouples verification from data exposure.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors