Midnight logoMidnight Academy

Glossary

Midnight-specific terms, in plain language. If a term from a lesson or project confused you, it's probably here.

Ledger state
Public, on-chain contract data. Anyone can read it, forever. Declared in Compact with the export ledger keyword.
Witness
Private, off-chain data supplied to a circuit. Never touches the chain unless explicitly disclosed. Declared with the witness keyword.
Disclose()
The function that deliberately moves a private value (or a computation on one) into public ledger state. Compact will not let you write private data to the ledger without it — a built-in guardrail against accidental leaks.
Circuit
Midnight's term for a contract function. A circuit can be a private computation, a public one, or a mix, depending on what it discloses.
Selective disclosure
The core idea behind Midnight: revealing only the specific fact that's needed (e.g. "this person is over 18") without revealing the underlying private data that proves it.
Shielded / Unshielded
Shielded refers to private balances and state; unshielded refers to public ones. Most Midnight wallets track both separately.
DUST
The resource used to pay for transaction execution on Midnight, generated gradually over time based on how much NIGHT a wallet holds. Distinct from NIGHT, the network's utility token.
Zero-knowledge proof (ZK proof)
A cryptographic method for proving a statement is true without revealing the private information behind it. Compact generates these automatically from your contract code.
Proof server
The local (or remote) service that generates zero-knowledge proofs for your transactions. Runs via Docker during development.
Compact
Midnight's contract language: a statically-typed, TypeScript-flavored DSL designed so developers can write privacy-preserving logic without personally understanding the underlying proof math.
Preview / Preprod
Midnight's public test networks. Preprod is generally the more stable, production-like testnet; Preview trails closer to in-development features.
Nullifier
A cryptographic value used to prove something hasn't happened before (e.g. this wallet hasn't voted yet) without revealing which specific identity is making the claim.