Draft ยท v1
receipts/v1
A receipt is a BSV transaction that witnesses a web document by its fingerprint, signed by the document's author. The document stays on the web. The ledger holds only the fingerprint, where to find the document, and a signature.
Format
One output of the transaction is a data-carrier script. Five plain-text pushes come first, then an AIP signature section:
OP_FALSE OP_RETURN
"https://ryanwold.net/receipts/v1"
"sha256"
<64 lowercase hex characters>
<URL of the exact version>
<media type, e.g. "text/vcard">
"|"
"15PciHG22SNLQJXMoSUaWVi7WSqc7hCfva"
"BITCOIN_ECDSA"
<signer address>
<compact signature>
| Push | Meaning |
|---|---|
| 1 | This page's URL. The receipt explains itself. |
| 2 | The digest algorithm. |
| 3 | The digest of the document's exact bytes, as hex text. It's text, not raw bytes, so it reads in any block explorer. |
| 4 |
A URL for that exact version, not a URL whose content changes.
The server also sends an RFC 9530 Repr-Digest header.
|
| 5 | The document's media type. |
| AIP |
An Author Identity Protocol signature over the pushes before it.
The signer is a key of the BAP identity that the document itself names (a vCard's X-BAP-ID).
|
Checking a receipt
- Fetch the document at push 4, or use a copy you already hold.
- Compute its SHA-256 and compare with push 3.
- Verify the AIP signature over the pushes before it.
-
Ask a BAP index whether the signer address was a valid key for the document's BAP identity at the receipt's block.
For example,
POST https://api.1sat.app/1sat/bap/identity/validByAddresswith{"address", "block"}. Checking at that block, rather than today, lets identities rotate keys without breaking old receipts. - The tx's block time is the latest moment the document could have existed. Mempool receipts are witnessed but not yet timestamped by a block.
Principles
- Commitments on the ledger, contents on the web.
- Readable by people, not only by software.
- Checkable without trusting the issuer, the explorer, or this page.
- No wallet needed to read or check.
- Nothing personal on-chain beyond the small public profile an identity chooses to publish. Deleting a document leaves a fingerprint that points to nothing.
Keys and identities
Receipts follow Yours Wallet's model. The identity is a BAP ID, derived from a root key that only signs identity records. Everyday signing uses a key the identity declares, and that key can rotate. Documents name the BAP ID, never a key, so they outlive rotation.