Sealing Secrets on Midnight: persistentHash, persistentCommit and Their Transient Twins

Midnight lets you prove things about private data without showing the data, and four small functions do much of that work: persistentHash, persistentCommit, transientHash and transientCommit. They look almost identical, yet picking the wrong one can leak a secret or leave a contract holding values that no longer match after an upgrade. This guide explains what each one does, how to choose between them, and walks through a working example, all checked against Midnight's official documentation.

Found this useful?

Replies

Discussion

Join the discussion

Sign in with Google to reply. You stay on this article while you sign in.

No replies yet

Sign in with Google to start the discussion.

Support this workCardano · ADA

Support with ADA

If a post saved you time, a small tip keeps the writing independent.

addr1qy7w8dvq0…p9gquyz5en

On-chain tips via smart contract coming soon.

Newsletter

New blocks, straight to your inbox.

New articles on web3, smart contracts and decentralized systems, plus a short weekly roundup when there is something new. No spam, and you can unsubscribe in one click.

FreeNo spam1-click unsubscribe