Layer 1: Browser Proof Client
Challenge generation, DNSSEC verification via Cloudflare DoH, Circom/snarkjs proof generation. Nonce and secret stay in memory only.
Poseidon(domain, nonce) · DNSSEC TXT · Groth16 BN254 · Web WorkerProduction-ready ZK identity infrastructure for Stellar smart contracts. DNS domain control in. Zero-knowledge proof out. Domain never touches the chain.
Challenge generation, DNSSEC verification via Cloudflare DoH, Circom/snarkjs proof generation. Nonce and secret stay in memory only.
Poseidon(domain, nonce) · DNSSEC TXT · Groth16 BN254 · Web WorkerVerifier contract runs native BN254 pairing check. Registry issues reusable credentials with 30-day cap. GatedAction demo shows SDK in production.
Verifier · Registry · GatedAction · Protocol 26 host functionsDomain-gated payments, voting, minting, admin actions, access control — all without knowing the underlying domain.
CloakworkClient::require_valid_credential(&env, registry, owner, nullifier)Generate Poseidon commitment and local nonce + secret.
Publish DNSSEC-signed TXT record at _stellar-cloakwork.domain.
Circom circuit runs in Web Worker. Exports 256-byte Groth16 proof.
Registry calls Verifier. BN254 pairing check passes. Credential issued.
One SDK call gates any action behind the active credential.
Panics if credential is invalid, expired, or revoked. The idiomatic one-line guard.
Returns Option<DomainCredential> for a nullifier. Non-authenticating read.
Returns bool — true only if Active, owner matches, and not expired.
# 1. Clone the repo
git clone https://github.com/Mohamed-Aaftaab/Cloakwork.git
cd Cloakwork && npm install
# 2. Connect Freighter wallet on Stellar testnet
# Visit /app and click "Connect Wallet"
# 3. Generate a challenge for your domain
# Enter domain name → Generate Challenge
# 4. Publish TXT record at _stellar-cloakwork.yourdomain.com
# Then click "Check DNSSEC" — must show AD=true
# 5. Generate ZK proof (~30s, runs in browser)
# Click "Generate ZK Proof"
# 6. Submit to Soroban → DomainCredential issued on-chain
# Click "Submit to Soroban"
Private DNS-backed identity for any Stellar app. No ZK knowledge required.