Midnight lab · programmable privacy

Build in the dark.
Prove it in public.

Thirteen working studios for Compact, Lace, sealed markets, and dual-state privacy. Local-first. No fake chain claims.

Educational browser apps. Pages is live. Not an on-chain deploy and not a DUST transfer.

Midnight horizon: a cyan proof grid under a violet ring
Studios
13
Reachable locally
—
Compat pins
7
On-chain?
No

Studio gallery

Beautiful cards for every shipped studio. Status probes sibling paths when you serve the assembled site — otherwise they stay honest about local-only.

Studio LOCAL-TRUE

Nocturne Messenger Studio

Private sealed DMs with real localStorage, multi-tab sync, and JSON export/import — envelope veil, commitment rail, selective reveal theater. Not a relay. Not on-chain.

Studio · dual-state · messenger Unchecked
Studio LOCAL-TRUE

Compact Atelier

Editable Compact snippets with real localStorage lesson progress, multi-tab sync, and JSON export/import. Explain panel + lint theater — not a Compact compiler.

Studio · Compact · explain panel Unchecked
Studio CONNECT ONLY

Lace Connect Studio

Real Lace discover/connect — prefs, reconnect, balance refresh, health watch, error recovery actions + network-switch soft-clear. Kit 0.3.2 + connector API 4.0.1. No transfers.

Vite · kit 0.3.2 · real Lace connect Unchecked
Studio LOCAL-TRUE

Auth Forge Studio

MPS-0029 attack journey, dual-rail threat meters, auth scorecard, forge theater, local bboard — real localStorage, multi-tab sync, JSON export/import. Not on-chain.

LOCAL-TRUE · journey · scorecard Unchecked
Studio LOCAL-TRUE

Shield Board

Dual-state privacy bulletin with real localStorage, multi-tab sync, and JSON export/import — public commitments, private vault, selective disclose, MPS-0029-safe take-down. Not on-chain.

Local dual-state · educational Unchecked
Studio LOCAL-TRUE

Veil Pledge Studio

Private tip jar & pledge board with real localStorage, multi-tab sync, and JSON export/import — seal amounts, commit public hashes, prove thresholds without revealing exact tips. Not on-chain.

Studio · dual-state · tip jar Unchecked
Studio LOCAL-TRUE

Night Market Studio

Sealed listings & private bids with real localStorage, multi-tab sync, and JSON export/import — public titles + commitments; reserves and bid amounts in a vault; prove bid ≥ reserve without revealing either. Not on-chain.

Studio · dual-state · marketplace Unchecked
Studio LOCAL-TRUE

Private Ballot Studio

Sealed polls & private votes with real localStorage, multi-tab sync, and JSON export/import. Nullifiers stop double-votes; tally theater stays educational — not on-chain.

Studio · dual-state · ballot Unchecked
Studio LOCAL-TRUE

Veil Passport Studio

Confidential credentials with real localStorage, multi-tab sync, and JSON export/import. Seal claims, present a public surface, selective disclose, prove age ≥ N or membership ∈ set — not on-chain.

Studio · dual-state · credentials Unchecked
Studio LOCAL-TRUE

Proof Playground

Visual ZK / circuit explainer with real localStorage history + witness presets, multi-tab sync, and JSON export/import. Simulated prove/verify — not a proof server.

Studio · circuits · prove theater Unchecked
Studio LOCAL-TRUE

Sealed Invite Studio

Private RSVP with real localStorage, multi-tab sync, and JSON export/import — public event titles + commitments; capacity and guest identities in a vault; prove seats remain without revealing who. Not on-chain.

Studio · dual-state · RSVP Unchecked
Studio LOCAL prove

Hello Studio

Local ZK prove metrics for hello.compact increment — mirrors Escrow #local-prove via shared @kshot/prove-metrics (last-prove.json / prove-bridge :6399 POST /prove?contract=hello). Educational — not on-chain.

hello · local ZK metrics Unchecked
Studio LOCAL-TRUE

Agent Escrow Studio

Role theater (Client / Agent / Approver) with real localStorage, multi-tab sync, JSON export/import, and optional local ZK prove metrics via shared @kshot/prove-metrics (last-prove.json / prove-bridge :6399, path selector) — dual-state proof panes, visual timeline. Educational state machine — not on-chain.

Role theater · dual-state UX Unchecked

Status = HTTP probe of sibling paths on this origin (assembled Pages build or multi-app local serve). Serving only midnight-lab-site/ will correctly show Not found — that is honest, not broken.

Compact · proof-server · Preprod honest status

Honest Preprod lab status. Compiled yes · local prove ready (hello + escrow) · proof-server local health optional · hello DEPLOYED on Preprod — live contract address below (call only after tx confirm).

Compact hello + escrow

Compiled

Real artifacts: hello-midnight/out + agent-escrow managed (Compact 0.31.1, 12 impure circuits). Off-chain only — not a chain submit.

  • CLI: npm run compact:hello / compact:escrow
  • Package: @kshot/preprod-hello-stub

Proof-server

Optional check

Local :6300 (image 8.1.0). Browser probe is optional and may fail on Pages / CORS / remote hosts — that does not mean the box server is down.

Not probed yet

Prove-bridge

Optional check

Local CORS bridge :6399 for Studio #local-prove (hello + escrow via shared @kshot/prove-metrics). Soft-fails when down — expected on Pages / remote hosts. NOT on-chain.

Not probed yet

Local prove ready

hello + escrow

Off-chain ZK against proof-server :6300 via prove-bridge :6399 — hello increment and agent-escrow multi-circuit lifecycle (synthetic client/agent/approver secrets). Not on-chain.

  • CLI: npm run prove:hello-local
  • CLI: npm run prove:escrow-local (path=happy default)
  • All 12 impure: npm run prove:escrow-all
  • Studio: Hello Studio #local-prove · Escrow #local-prove · shared @kshot/prove-metrics · prove-bridge :6399 — still NOT on-chain

Preprod hello — live

Deployed

On-chain hello confirmed on Midnight Preprod. On-chain increment CONFIRMED (greetings 0→1). CLI: stub:call-preprod. Brand: donate ADA + @kshot9000.

  • Contract: bfbe9b7b17f23bf85513d3d2b05f7a020c2ffd836b22f50a0097d7530e6d87f9
  • Deploy tx: 0091f8c7ef78f37583a2fc34505425d53e36bad0cd6f655d13e69ce37b411fae4f
  • Call tx (increment): 0095c40235431eb47fb75be8480c56c29a2878a05282dfd20884419c24593b5c8b · greetings 0→1 · block 2739171
  • Docs: PREPROD-HELLO-DEPLOY.md
  • Explorers: midnightexplorer · subscan
Optional — soft-fails on Pages / CORS / when services are down

Compat Matrix Explorer Sep 2026 research

Interactive pins from lab research — always verify against the official Midnight compatibility matrix before deploying.

Source of truth: installation / matrix docs · Never treat these pins as a substitute for the official matrix.

What is Midnight?

Midnight is a fourth-generation blockchain designed for programmable privacy: developers write smart contracts in Compact, which compiles to TypeScript/JavaScript bindings and zero-knowledge circuits. Public ledger state stays on-chain; private state can remain local to the client, with selective disclosure when required.

Source of truth: midnight.network · docs.midnight.network

Lace wallet

Browser wallet used with Midnight DApps. Connect via the official DApp connector API; point local proof generation at your proof server when developing.

Connector API →

This hub

Repo layout under apps/ and contracts/ — flagship Studio Hub plus commented Compact skeletons. Compile only after installing the official toolchain.

Open repo →

NIGHT & DUST (high-level)

NIGHT

Native unshielded utility / governance token. Registered NIGHT holdings generate the DUST resource used for fees. Testnets use tNIGHT from the faucet.

DUST

Shielded, non-transferable network resource consumed to pay transaction fees. Regenerates over time from registered NIGHT (test: tDUST).

Details: NIGHT overview · Acquire tokens / faucet guide · Glossary

Start building

  1. Install Compact + proof server from the official installation guide (pin versions from the compatibility matrix — see Compat Explorer).
  2. Install Lace, select the Midnight network (e.g. Preprod for test work), and fund with faucet tNIGHT → generate tDUST.
  3. Explore contracts/hello-midnight/hello.compact in this repo, then follow an official tutorial such as the privacy-preserving leaderboard DApp.
  4. Serve this Studio Hub locally: cd apps/midnight-lab-site && python3 -m http.server 5173
  5. Lace Connect — npm run dev:lace-demo → http://localhost:5174 (Pages path /lace/ when Actions enabled).
  6. Auth Forge — cd apps/auth-lab && python3 -m http.server 5176
  7. Shield Board — cd apps/shield-board && python3 -m http.server 5177
  8. Veil Pledge — cd apps/veil-pledge && python3 -m http.server 5179
  9. Night Market — cd apps/night-market && python3 -m http.server 5180
  10. Sealed Invite — cd apps/sealed-invite && python3 -m http.server 5181
  11. Private Ballot — cd apps/private-ballot && python3 -m http.server 5183
  12. Veil Passport — cd apps/veil-passport && python3 -m http.server 5184
  13. Compact Atelier — cd apps/compact-atelier && python3 -m http.server 5185
  14. Nocturne Messenger — cd apps/nocturne-messenger && python3 -m http.server 5186
  15. Proof Playground — cd apps/proof-playground && python3 -m http.server 5182
  16. Agent Escrow — cd apps/agent-escrow-stub && python3 -m http.server 5175

GitHub Pages is live from the gh-pages branch. Actions workflow deploy is still optional.