# The ledger

> Every number on this site is a receipt. Your browser can check all of them.

An artist on Castpad *is* their receipts. The page you see is computed by replaying them, from the first to the last, with the same rules on the server, in the API and in your browser.

## What a receipt is

```
{ show, seq, kind, at, body, prev, hash }
hash = sha256( canonical({ v: "castpad/1", show, seq, kind, at, body, prev }) )
```

- `seq` counts from 0 with no gaps. `at` never goes backwards.
- `prev` is the previous receipt's hash, so changing any old number changes every hash after it.
- `canonical()` sorts keys and allows only integers, strings, booleans, null, arrays and plain objects, so every machine computes the same bytes.
- The database refuses to update or delete a receipt.

## Two checks

1. **The chain**: hashes, numbering, times and links all agree.
2. **The rules**: every receipt is re-applied. A receipt the rules would refuse (a ticket before a debut, a verdict that doesn't follow from the reads) breaks the chain even if its hash is right.

## Credit lives here

Releases record who made them. A contributor's name, the post, and every later read of that post sit in the same chain. Credit can't be quietly edited later, by anyone, including us.

## Check it yourself

- On any artist page: **Replay all receipts in your browser**, then change one number and watch it fail.
- Download a chain and drop it on [/verify](/verify).
- Or by hand: `GET /api/shows/{slug}/receipts?download`.

## What it does not prove

That X's counters were honest when read, or that our first read was faithful. Fraud signals, human review and a paid audition slot narrow that gap; an independent second reader co-signing reads would close it further, and is planned.
