Revolutionizing Privacy: Building a Custodian App with Zero-Knowledge Proofs on Midnight Network
January 17, 2026
Private state definitions specify types for AssetHolding, PersonalData, KYCDocuments, AccreditationData, and CustodianPrivateState, supported by factory and witness functions that derive proof inputs for selective-disclosure.
The project showcases a complete custodian contract with initialization, account management, deposit/withdraw flows, KYC/admin actions, and multiple selective-disclosure circuits covering balance thresholds, ranges, account tier, KYC level, accreditation, age verification, residency, and investment eligibility.
Conclusion and next steps outline a comprehensive blueprint and starter code to deploy a privacy-preserving custodian app with selective disclosure on Midnight, including real-world use cases and deployment patterns.
The article provides a thorough guide and code-focused overview for building a privacy-preserving custodian app using Midnight Network and selective disclosure via zero-knowledge proofs, detailing architecture, data flows, and practical implementation steps with prerequisites and code examples.
System architecture describes the interaction between client apps, Midnight Network with a public ledger, private state, ZK circuits, and verifiers, plus an auditor layer that validates proofs without accessing private data.
Practical considerations include unit tests, simulators, and admin functions for governance and compliance (freeze/unfreeze/close accounts, tier updates), emphasizing security in a custodial environment.
Step-by-step setup and project layout cover prerequisites (Node, npm, Docker), installing the Compact compiler, cloning a starter template, creating the custodian contract structure, and configuring frontend/backend files in a mono-repo.
Selective disclosure is the core concept, enabling custodians to prove claims about client assets using ZK proofs for thresholds, ranges, KYC status, accreditation, and other attributes without exposing underlying data.
A privacy-preserving custodian app is built around core components: a custodian contract to manage deposits and withdrawals, disclosure circuits to generate zero-knowledge proofs, on-chain verifier functions to validate proofs, and a credential registry for tracking verified attributes, with private witness data such as balances, holdings, personal data, KYC, and accreditation details kept off-chain.
Data flow guarantees that deposits update private state, proofs are generated off-chain via ZK circuits, and verifiers confirm proofs without revealing private data, ensuring privacy-preserving verification.
Summary based on 1 source
Get a daily email with more Tech stories
Source

DEV Community • Jan 17, 2026
Building a Privacy-Preserving Custodian App with Selective Disclosure on Midnight