Demo · Live on Midnight preview + preprod

Midnight Ledger

A Compact contract that logs choreography to the public ledger while the author's identity stays behind a private-witness ZK proof. Reading is public — writing needs the Lace wallet, the local proof server, and a small amount of tDUST from the faucet.

Hit a 1010 InvalidDustSpendProof, DustSpendProcessed decode error, or /check 400 bad input? See known issues →

try it · connect lace
Deploy status · both networks
preview○ awaiting deploy
Midnight Preview Testnet

Not yet deployed. Run bun scripts/deploy-midnight.mjs locally — the script writes the address + tx into src/data/midnight-contract.preview.json.

preprod○ awaiting deploy
Midnight Preprod Testnet

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.

Reading from
Midnight Preprod Testnet · Compact 0.23
contract address · preprod
0x00… (contract not yet deployed on this network)
indexer
https://indexer.preprod.midnight.network/api/v4/graphql
wallet · lace

Lace ships as a mobile wallet today (iOS / Android, the MetaMask / Phantom equivalent for Cardano) — but only for Cardano. Midnight support on mobile is not shipped yet, so use the Lace desktop browser extension for these demos.

preview · address sanity check
MIDNIGHT_WALLET_SEED="your words stay local"   bun scripts/check-midnight-wallet.mjs --network=preview

The preview faucet only accepts an unshielded address (mn_addr_preview…).

expected preview prefixes
mn_addr_preview1… · mn_shield-addr_preview1…

Public ledger view · preprod

Read-only. Pulled from the Midnight preprod Indexer over GraphQL — no Lace wallet required to browse.

Awaiting first deploy on preprod. The deploy has to run on your own machine — Docker + Midnight's proof server are required, and the Lovable sandbox has neither.
Funding gotcha: the preprod faucet only accepts an unshielded address (mn_addr_preprod1…). Import the seed into Lace on Midnight preprod, copy its unshielded address, request tNIGHT, then click Generate tDUST in Lace to delegate. See acquire-tokens docs ↗.
Once tDUST lands, run VITE_NETWORK_ID=preprod bun scripts/deploy-midnight.mjs; it writes the deployed address into src/data/midnight-contract.preprod.json and this page hydrates from the Indexer.

Try it locally (writable demo)

The write path (Lace + WASM + local proof server) is a client-only, browser-globals-heavy stack that will not run under this site's SSR shell. Grab the full recipe from the strategy page and run it on your machine.

  1. Install Lace, switch it to Midnight preview or preprod, get tDUST from the matching faucet.
  2. compact updatecompact compile your .compact file.
  3. docker run -p 6300:6300 midnightntwrk/proof-server:latest midnight-proof-server -v
  4. Paste any mega-prompt from this repo into Lovable — it wires Lace + the proof server + Indexer for you.