LOCAL-TRUE · not on-chain

Dual-state · private tip jar

Veil Pledge Studio

World-class educational tip jar for Midnight’s dual-state model: seal a private amount + note, commit only a public hash to the simulated ledger, then prove a threshold (amount ≥ X) without disclosing the exact tip — or selectively disclose when you choose. By @kshot9000 · nightdream.xyz.

Honest scope: local HTML/JS simulation only. Does not run Compact, a proof server, Lace, or real ADA transfers. Does not claim GitHub Pages is live until Actions are enabled. SHA-256 commitments here are a teaching stand-in — verify against official Compact / Zswap crypto before shipping.

Pledge journey

Labeled phases from private compose → public commitment → selective disclose. Error / reject is first-class.

  1. 1
    Idle No sealed draft
  2. 2
    Sealed Private vault holds amount
  3. 3
    Committed Public hash on ledger
  4. 4
    Disclosed Range or full reveal

Phase: idle — compose a private pledge to begin.

The dual-state tip in one screen

Public ledger sees a commitment. Private vault keeps amount + salt. Threshold proofs disclose a predicate — not the tip itself.

Public ledger

Commitment only

On-chain (here: simulated) state holds H(amount ‖ note ‖ salt ‖ domain) + optional range claim. No ADA amount in the clear.

  • Commitment hash (hex)
  • Timestamp / pledge id
  • Optional disclosed flag / range tag
Private vault

Local witnesses

Amount, note, and salt stay in localStorage — a stand-in for Compact witnesses / local state that never leave the client.

  • amountAda (decimal)
  • note (private message)
  • salt (32-byte hex)

Sealed rail

Observers see only the commitment. Exact tip stays veiled.

100% veiled (no pledges yet)

Disclose rail

Threshold or full disclose trades privacy for proof / gratitude.

0% disclosed

Compose & seal simulated

Build a private pledge, seal witnesses, then commit the hash to the public board. No Compact runtime — educational only.

1. Private tip

Amount and note stay in the vault until you disclose.

Teaching stub — not a real transfer
0 / 160

No sealed draft.

2. Commitment preview

Domain-separated SHA-256 stand-in for a Compact commitment.

Salt
—
Commitment
—
Vault amount
—
Note (private)
—

Seal first, then commit.

3. Tip target lab ADA

Real Cardano donation address for this lab — copy anytime. The pledge theater does not send ADA.

addr1q8hnl6vl5a6k3rw3n5g3jtte696zcl76kfatzv7gpswa9r0dj7fma6klq55y4ffm7tf0em09udnyhuk4ah92pl5x9jpqjae44v
@kshot9000

Threshold theater simulated

Prove amount ≥ threshold without revealing the exact tip. Reject is a first-class outcome when the vault cannot satisfy the claim.

Claim

Must be sealed + committed first

No proof attempted.

Proof transcript (local)


          
Result —

Pledge board

Public commitments first. Private bodies stay veiled until threshold or full disclose. Real localStorage (schema v2) + multi-tab sync + JSON export/import — still LOCAL-TRUE, not on-chain.

0 pledges 0 sealed 0 disclosed Σ veiled —

localStorage schema v2 · BroadcastChannel sync · Export may include amounts/salts — treat as sensitive. LOCAL-TRUE ≠ on-chain.

Tip jar atelier

Visual fill from local pledges. Real tips still go to the Cardano address below — this jar does not move coins.

Support the Midnight lab

Built by @kshot9000 (creator of nightdream.xyz). Paste this address in Lace / any Cardano wallet. Optional memo: “Veil Pledge”.

addr1q8hnl6vl5a6k3rw3n5g3jtte696zcl76kfatzv7gpswa9r0dj7fma6klq55y4ffm7tf0em09udnyhuk4ah92pl5x9jpqjae44v
Follow @kshot9000

Jar fill is from local simulated pledges only.

Compact shape (illustrative)

Not compilable as-is — verify against current Compact docs / Zswap APIs before shipping.

✗ Cleartext tip on ledger
export ledger tipAda: Uint<64>;

export circuit tip(amount: Uint<64>): [] {
  // Everyone sees the tip forever
  tipAda = amount;
}
✓ Commitment + selective disclose
witness tipAmount(): Uint<64>;
witness tipSalt(): Bytes<32>;

export ledger commitment: Bytes<32>;

export circuit seal(): [] {
  commitment = disclose(
    persistentHash<…>([tipAmount(), tipSalt()])
  );
}

// Later: prove tipAmount() >= threshold in-circuit
// without writing the exact amount to the ledger.

Prefer official starters: example-bboard · Compact docs · security best practices. Auth gates: never assert(ownPublicKey() == owner) alone — see Auth Forge Studio / MPS-0029.