Demo · Live on Midnight preview · preprod · undeployed

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 (or the genesis wallet on undeployed).

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

try it · connect lace
Deploy status · all 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.

undeployed○ awaiting deploy
Midnight Local · Undeployed

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.

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.

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

The preprod faucet only accepts an unshielded address (mn_addr_preprod1…).

expected preprod prefixes
mn_addr_preprod1…… · mn_shield-addr_preprod1…

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, preprod, or undeployed (local), then get tDUST from the matching faucet — or from the genesis wallet on undeployed.
  2. compact updatecompact compile your .compact file.
  3. docker run -p 6300:6300 midnightntwrk/proof-server:8.1.0 midnight-proof-server -v
  4. Fastest path (undeployed): bun scripts/midnight-standalone.mjs up then VITE_NETWORK_ID=undeployed bun scripts/deploy-midnight.mjs — no faucet, Docker-only. See the guide.
  5. Paste any mega-prompt from this repo into Lovable — it wires Lace + the proof server + Indexer for you.