Privacy-first identity and form verification using Zero-Knowledge Proofs (ZKPs) on the Midnight blockchain.
Luna implements ZeroReveal, a next-generation form and identity verification plugin that enables platforms to verify facts about users without exposing sensitive personal data. Using Selective Disclosure and Zero-Knowledge Proofs, users prove specific claims (e.g., "I am over 18") without revealing the underlying data (e.g., passport details, home address).
- Privacy by Design — Verify truth, not data
- Progressive Disclosure — Reveal raw data only when pre-agreed conditions are met
- Blind Processing — Enable unbiased evaluation by decoupling identity from submissions
Proves passengers are legally authorized to fly without exposing exact passport numbers or addresses. ZK proofs verify valid passports and name matches; agents see only a green checkmark.
Enforces blind judging and eliminates geographic/gender bias. Participants register anonymously, generate ZKPs to prove eligibility. Legal/demographic data unlocks only if they win.
Protects victim and witness identities in sensitive cases (e.g., POCSO Act). Zero-knowledge architecture ensures confidentiality of testimonies and sensitive records.
Luna is organized as a monorepo with three main workspaces:
- Language: Compact (TypeScript-like, compiled for Midnight)
- Responsibilities:
IdentityRegistry: Stores hashes of user data signed by trusted issuersZKVerifier: Contains cryptographic logic to verify ZK-SNARK/STARK proofsAppGateway: Business logic for the specific use case
- Build:
pnpm run build(compiles Compact → circuit + contract types)
- Midnight provider setup
- Pinata IPFS integration for encrypted data storage
- Luna contract API endpoints for proof verification
- Indexing and public data providers
- Framework: React 19 + Vite
- UI Library: Material-UI (MUI)
- State Management: RxJS + fp-ts
- Forms: Three use-case templates (airline, hackathon, legal evidence)
- Build:
pnpm run build(compiled to dist/)
Core
- Midnight Network + Compact language
- Zero-Knowledge Proofs (zk-SNARK/STARK)
- IPFS (Pinata) for decentralized storage
Backend
- Node.js + TypeScript
- Midnight JS SDK (providers, contracts, indexing)
- Axios for HTTP
Frontend
- React 19
- TypeScript
- Vite (bundler)
- Material-UI
- React Router
DevOps
- Docker Compose (Midnight node, indexer, proof server, IPFS)
- pnpm workspaces
See STARTUP.md for detailed environment setup and development workflow.
- Node.js 18+
- pnpm 8+
- Docker & Docker Compose (for local blockchain/IPFS)
# Install dependencies
pnpm install
# Build all workspaces
pnpm run build
# Type check
pnpm run typecheck
# Run tests
pnpm test# Start Midnight node, indexer, proof server, IPFS
docker-compose -f docker/midnight/node/compose.yaml up -d
docker-compose -f docker/midnight/indexer/compose.yaml up -d
docker-compose -f docker/midnight/proofserver/compose.yaml up -d
docker-compose -f docker/ipfs/compose.yaml up -d
# Start UI dev server
cd ui && pnpm run dev
# API is available at http://localhost:3000 (configured in .env)- GDPR/CCPA Compliant: Verifiers never hold raw sensitive data; liability is massively reduced
- Anti-Spoofing: All verifiable credentials must be cryptographically signed by a trusted issuer
- Circuit Privacy: All data through circuits or returned by witnesses is private
- Ledger Exposure Prevention: Developers must explicitly disclose data when moving from private to public ledger states
contracts/src/luna.compact— Main smart contract definitioncontracts/src/managed/luna-contracts/— Compiled circuit & types (auto-generated)api/src/storage.ts— Pinata/IPFS integrationui/src/pages/— Form pages for each use case
- Contracts: Edit
.compactfile →pnpm run compact→ auto-generates circuit + types - Backend: Update API endpoints in
/api/src→pnpm run build - Frontend: React components in
/ui/src→ Hot reload via Vite - Testing:
pnpm testacross all workspaces
- Type Errors:
pnpm run typecheck(root) - Contract Compilation:
cd contracts && pnpm run compact - Lint Issues:
pnpm run lint - Docker Issues: Check individual service logs in
docker/*/compose.yaml
- GitHub: yellowwlabs/luna
- Issues: luna issues
ISC