Privacy-preserving identity protocol built on the Midnight Network.
ShadowTrace is a zero-knowledge identity interface for proving age eligibility without exposing the user's date of birth.
- Age Eligibility Proof: Proves
age >= 18from a local DOB witness. - DOB Privacy: The date of birth is held in private state, used for proof generation, then discarded locally.
- Compact Smart Contract:
contract/src/age-verify.compactasserts the age rule and stores only proof metadata. - 1AM Wallet Flow: Connects to
window.midnight['1am']on preprod and uses the wallet-sponsored proof/balance/submit path. - Midnight SDK Integration: Uses generated Compact assets from
contract/src/managed/age-verifyand serves ZK keys frompublic/zk/age-verify.
- Frontend: Next.js App Router with a client-side React dashboard in
app/page.tsx. - Styling: Global CSS in
app/globals.css. - Assets: Static assets in
public/. - Smart Contract:
contract/src/age-verify.compact. - Generated Contract:
contract/src/managed/age-verify. - ZK Assets:
public/zk/age-verify.
Install dependencies:
npm installStart the development server:
npm run devCompile the Compact contract and sync ZK assets:
npm run build:contractOn Windows, compact may resolve to the built-in NTFS compression tool. Install the Midnight Compact compiler, then run with COMPACT_BIN pointing to the real executable if needed:
$env:COMPACT_BIN="C:\path\to\midnight\compact.exe"
npm run build:contractCreate a production build:
npm run buildBuilt for the Midnight ecosystem hackathon.