why-midnight
Skill18 starsChanged 17 days agoMITView on GitHub
What Midnight is, why it exists, and how it works (public/private state, selective disclosure, and zero-knowledge proofs).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- tusharpamnani/Midnight-Skillsword for word, first seen May 2, 2026
Other versions1 project uses a version of this.
Word for word · 1
- tusharpamnani/Midnight-Skills★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- 1am-walletSkill
- android-example-votingSkill
- ankr-midnightSkill
- compactSkill
- dynamic-midnight-walletSkill
- example-counterSkill
- example-hello-worldSkill
- example-leaderboard-dappSkill
- example-locker-dappSkill
- example-passport-dappSkill
- example-payment-dappSkill
- example-private-party-dappSkill
- example-private-reserve-auction-dappSkill
- example-zk-loan-applicationSkill
- gsap-coreSkill
- gsap-utilsSkill
- indexerSkill
- midnight-consensusSkill
- midnight-cryptographySkill
- midnight-environment-setupSkill
- midnight-jsSkill
- midnight-onchain-logicSkill
- midnight-p2p-networkingSkill
- midnight-passportSkill
- midnight-rpcSkill
- midnightskillSkill
- midnight-storageSkill
- midnight-transactionsSkill
- multinetworkSkill
- nftSkill
- react-wallet-connectorSkill
- midnight-securitySkill
- testingSkill
- token-transfersSkill
- zk-vs-fhe-vs-mpcSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Verify computations without seeing the input data
- Distinctive: line 75
When a user initiates a transaction on Midnight, the process follows a specific sequence to maintain privacy while ensuring validity:
- Distinctive: line 100
Data minimization: only essential data goes on-chain.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
What is Midnight?
Midnight is a data protection blockchain platform. It addresses a fundamental challenge in blockchain technology: how to use the benefits of distributed ledgers while maintaining the privacy required for sensitive data.
Unlike traditional blockchains where every transaction is permanently visible to all participants, Midnight introduces selective disclosure — the ability to prove facts about data without revealing the data itself. This enables blockchain adoption in regulated industries like healthcare, finance, and government services where data protection is not just important, but legally required.
Core concepts
Data protection blockchain
Midnight maintains two parallel states:
- Public state: Traditional blockchain data stored on-chain, visible to all network participants. This includes transaction proofs, contract code, and any intentionally public information.
- Private state: Encrypted data stored locally by users, never exposed to the network. This includes personal information, business data, and any sensitive content that must remain confidential.
Zero-knowledge proofs
The bridge between public and private states is zero-knowledge cryptography. Using zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge), Midnight can:
- Verify computations without seeing the input data
- Prove statements are true without revealing why they're true
- Generate compact proofs (128 bytes) regardless of computation complexity
- Validate proofs in milliseconds on-chain
For example:
- A healthcare application can prove a patient qualifies for treatment without revealing medical history.
- A financial system can verify sufficient account balance without exposing the actual amount.
Compact programming language
Midnight introduces Compact, a domain-specific language based on TypeScript that makes privacy-preserving smart contracts accessible to mainstream developers. Instead of requiring cryptographic expertise, developers write familiar code that compiles into zero-knowledge circuits.
Why Midnight
Regulations require controlled data use
Privacy laws demand strong data protection, but public blockchains make all on-chain activity visible by default.
Frameworks such as GDPR, CCPA, and HIPAA require tight control over personal data. Midnight helps by enabling controlled, provable disclosure so teams can share only the information that is necessary.
Public chains expose too much
Organizations need decentralization but cannot place sensitive information on fully open ledgers.
Public chains reveal balances, actions, and metadata on a shared ledger. Private chains improve confidentiality but reduce decentralization. Midnight combines public and private state, giving teams decentralization with programmable confidentiality.
Privacy tooling is often inaccessible
Most teams cannot build ZK systems because they require specialized cryptographic expertise.
Traditional ZK development demands circuit design and proof-system knowledge. Midnight’s Compact language lowers this barrier by compiling TypeScript-like code into circuits and proofs automatically.
Private computation must still be verifiable
Sensitive logic needs privacy, but it must still prove correctness to the network.
Midnight lets users compute on private data locally and submit zero-knowledge proofs instead of raw inputs. Validators verify correctness without learning the underlying data, preserving both privacy and trust.
How Midnight works
Transaction flow
When a user initiates a transaction on Midnight, the process follows a specific sequence to maintain privacy while ensuring validity:
- Users perform computations on private data locally, never exposing it to the network.
- The Midnight runtime generates a zero-knowledge proof of this computation.
- This proof, along with any intended public outputs, is submitted to the blockchain.
- Network validators verify the proof using the zk-SNARK verification algorithm (milliseconds on-chain).
- Once verified, both public and private states update according to the proven computation — public state on-chain and private state in users' local storage.
Network architecture
Midnight operates as a proof-of-stake blockchain. Validators can participate permissionlessly through stake delegation, contributing to network security while earning rewards.
The platform maintains a native bridge to Cardano for asset transfers, enabling interoperability between the two chains.
The network processes two types of transactions:
- Standard public transactions that function like traditional blockchain operations
- Shielded transactions that use zero-knowledge proofs to maintain privacy
Both transaction types are validated by the same set of validators, ensuring consistent security across the network.
Privacy guarantees
Midnight implements several layers of privacy protection:
- Data minimization: only essential data goes on-chain; sensitive information remains in local storage.
- Forward secrecy: even if encryption keys are compromised in the future, past transactions remain private.
- Selective disclosure: users choose precisely what information to reveal and to whom.
- Optional compliance mechanisms: required reporting to authorities without compromising user privacy or exposing data to unauthorized parties.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

