# Code records

A code host is trusted to say who wrote what, when, and whether a release matches its source. A code record replaces that trust with evidence: the facts are read from the repository itself, over the git protocol anyone can use, hashed, and sealed into the public ledger, whose blocks are signed and timestamped in Bitcoin. Anyone can recompute every fact from the same public data. No code contents are ever stored — only hashes and the metadata the requester supplied — and a record exists only because someone requested it.

0 code records are on the ledger.

## The five records

- [Commit timestamp certificate](https://www.rightshold.com/code/anchored) — 0 records (code.anchored)
- [Source-to-artifact correspondence](https://www.rightshold.com/code/correspondence) — 0 records (code.correspondence)
- [License-at-commit certificate](https://www.rightshold.com/code/licenses) — 0 records (code.license)
- [Agent authorship receipt](https://www.rightshold.com/code/authorship) — 0 records (code.authorship)
- [Agent test-run receipt](https://www.rightshold.com/code/test-runs) — 0 records (code.test_run)

## How a record is made

- Commit timestamp certificate: `POST /v1/code/anchor` with a repository URL and a commit (or a ref; HEAD is the default). A public repository needs no token and no host account; a private repository is read only with its owner's access_token, used for that request and never stored.
- Correspondence: `POST /v1/code/correspondence` with a repository, a tag and the artifact's URL. The result — match, mismatch or not_comparable — is recorded exactly as computed.
- License at a commit: `POST /v1/code/license` with a repository and a commit.
- Agent receipts: `POST /v1/code/receipts/authorship` and `POST /v1/code/receipts/test-run`, recorded by an account for its own agent and bound to that agent's KYA identity; an agent with no KYA record at L1 or above is recorded as unverified, in those words.

Records are written by accounts (a live API key); sandbox keys never write to the public ledger. Reading is open to anyone: JSON at https://www.rightshold.com/v1/code/records.

## Most recent

No code record has been requested yet.
