Working ZK demos.
Three reference builds from the prompt library: a Compact-contract ledger, a hackathon-ready token kit, and the ChoreoCrowd Fund demo built live during the Midnight Fireside chat. All include deploy scripts, Lace wallet steps, and are tested on public testnets and the local Undeployed stack.
Not yet deployed. Run bun scripts/deploy-midnight.mjs locally — the script writes the address + tx into src/data/midnight-contract.preview.json.
Not yet deployed. Run VITE_NETWORK_ID=preprod bun scripts/deploy-midnight.mjs locally — the script writes the address + tx into src/data/midnight-contract.preprod.json.
Not yet deployed. Run VITE_NETWORK_ID=preprod bun scripts/deploy-midnight.mjs locally — the script writes the address + tx into src/data/midnight-contract.undeployed.json.
Midnight Ledger
Timestamp original choreography privately. A Compact appendEntry circuit commits the message to the public ledger while the author's identity stays hidden behind a ZK-proved witness. Public ledger view runs read-only over the Midnight Indexer.
ChoreoCrowd Fund
Private onchain crowdfunding for dance projects — built live during the Midnight Fireside chat. Demonstrates the server-append pattern (UI → /api/append-entry → genesis wallet) for local Undeployed writes, since Lace can't sign on the Undeployed chain. Source on GitHub.
StreetRail Move Rights NFT
A Compact NFT rail for move rights: mint → listSale → buy, settled in mUSDC on the local Undeployed stack. Writes go through the server-append genesis wallet, and the public ledger maps are strictly insert-only / append-only — the fix for the dust fee-balancer panic (transaction_feesWithMargin / transaction_merge) that hits any circuit overwriting an existing map key. Verified end to end (E2E_OK). Source on GitHub.
IPS Compass (Identus × Midnight)
Author an International Patient Summary (FHIR), digest it with SHA-256, issue a Hyperledger Identus credential over the digest, then anchor H("ips:anchor:v1" ‖ digest ‖ salt) in the append-only IpsAnchorRegistry Compact set — so a verifier confirms the summary existed unchanged without seeing any patient data. Both stacks (Midnight node/indexer/proof and the Identus Cloud Agent) are provisioned onto Fly Machines from inside the app: no local Docker, no compose, no CI. Live at ipsmidnight.lovable.app; source on GitHub. Setup rules and failure modes on our Identus page.
Tokenized Choreo Kits
A working end-to-end reference generated from the prompt library: deploy a local Compact contract, fund Lace on the Undeployed devnet, and submit ZK transactions. Includes the deploy script and the Lace-funding helper. Live on Fly.io — see the hosting recipe & open blocker. Source on GitHub.
flymidnight
Public Fly.io-hosted Undeployed stack — four apps (node · indexer · proof · faucet) deployed once, any visitor with Lace can try the demo without running Docker. Canonical reference for the WalletFacade 4.1.1 readiness check (state.dust.state.progress.isStrictlyComplete()), the public HTTPS proof-server URL, and the in-app Get tDUST faucet button. Live demo at flymidnight.lovable.app; source on GitHub.
A2A + AP2 Negotiation
Buyer and seller agents exchange typed A2A DataParts, agree on a CartMandate, and anchor the signed mandate on the Midnight MandateVault Compact contract. Live demo at agenticmidnight.lovable.app; source on GitHub.
UCP ZK-Checkout
RFC 9421-signed discovery and checkout, closed by recording the order hash on the Midnight OrderLedger. Live demo at ucpmidnight.lovable.app; source on GitHub.
x402 Midnight Paywall
Pay 0.01 mUSDC to unlock a protected endpoint. Ports the x402 v2 envelope + PAYMENT-SIGNATURE/PAYMENT-RESPONSE headers to Midnight, settling via the mimic MidnightUSDC contract. Live demo at x402midnight.lovable.app; source on GitHub.
m402 — private agentic payments
The reference private-payments rail: the same 402-and-retry flow, but the payment carries no payer. A vault pools NIGHT and mints a shielded credit 1:1, and pay takes no payer argument and reads no caller identity — it only proves it holds a valid credit worth the published price. The gateway is a pure reader: the agent submits its own transaction and the gateway watches the indexer for the receipt, so it never signs and cannot fake a payment. Open-track winner at Hack Buenos Aires. Live at m402-web-three.vercel.app; source on GitHub — read docs/constraints.md before you design any payment circuit. Its findings are folded into our Known issues page and every mega-prompt.
Hitting 1010 InvalidDustSpendProof, DustSpendProcessed decode errors, or /check 400 bad input? Field notes from the Midnight team, with the current workaround for each.