NEWPrivate request is open: mask a prompt in your browser and seal its receipt, free, with anchoring live on Robinhood Chain.Try it →
04 · Contract

Receipts and the receipt ledger

A receipt is one 32-byte hash that binds a masked request to its answer. The ledger is a small contract that lets the author publish that hash with a block time, and nothing else.

Chain Robinhood Chain · 4663Token $OPAQ
4.1

The receipt formula

Computed in your browser and, identically, by the contract's computeReceipt (a shared test vector keeps the two equal):

receipt = keccak256(abi.encode(
  keccak256("OPAQ request receipt v1"),   // domain tag
  author,                                 // your address
  salt,                                   // 32 random bytes from your browser
  keccak256(maskedRequest),               // UTF-8 text that left the device
  keccak256(answer),                      // UTF-8 answer text
  keccak256(modelId)                      // e.g. "demo/local-responder-v1"
))

The original, unmasked request is never part of a receipt. The salt keeps anyone from testing guesses about your request against the public hash; you decide who gets it, by sharing the receipt file.

4.2

The ledger

0x4B56f6f60B4EE467f10b9f840569213a62825ed4

  • record(bytes32 receipt, bytes32 modelTag) → id: stores the hash, the tag, msg.sender, the Robinhood Chain block number and the block time. The block number comes from the chain's ArbSys precompile, because on this chain the EVM's own block number reports the parent chain's block. Reverts with EmptyReceipt, EmptyModelTag, or AlreadyRecorded when the same wallet records the same receipt twice.
  • check(address author, bytes32 receipt), idBy(author, receipt), getReceipt(id), countOf(sender), receiptsOf(sender, start, limit), chainBlock(): free reads.
  • computeReceipt(author, salt, requestHash, responseHash, modelTag): the formula above, as a pure function.
  • Event ReceiptRecorded(id, sender, receipt, modelTag) for every record.
  • No owner, no admin, no fee, no pause, no proxy; it accepts no ETH. Records can never be edited or removed.
4.3

Verifying a receipt

  1. Open /app/verify and paste the receipt file (or pick it from your saved receipts).
  2. Your browser recomputes the hash from the author, salt, texts and model id. Any changed character gives a different hash.
  3. It then asks the ledger whether that author recorded that hash, and shows the block and time.
Next →Honest limits