Code
Code records
Agents: markdown · /v1/code/records (JSON) · the ledger: /ledger.
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 on this page 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.
The five records (0 on the ledger)
- Commit timestamp certificate 0
A commit existed, with exactly this tree, at the time the record was sealed. Anyone can recompute the tree hash from the repository and compare.
- Source-to-artifact correspondence 0
A shipped artifact was hashed and, for tar archives, compared file by file against its tag's tree. The result is recorded exactly as computed — a mismatch is a first-class result and stays on the record.
- License-at-commit certificate 0
The license texts standing at one commit, identified and hashed. What the license said at that commit can never be quietly rewritten later.
- Agent authorship receipt 0
An agent records that it authored a commit. When the agent's identity is proven (RS-KYA L1 or above) the receipt says verified; when it is not, the receipt says unverified — in those words.
- Agent test-run receipt 0
An agent records that a suite ran against a commit, with the result and the SHA-256 of its run report, sealed under its identity. The record is the agent's, standing behind its name.
How a record is made
- Commit timestamp certificate —
POST /v1/code/anchorwith 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'saccess_token, used for that request and never stored. - Correspondence —
POST /v1/code/correspondencewith a repository, a tag and the artifact's URL. - License at a commit —
POST /v1/code/licensewith a repository and a commit. - Agent receipts —
POST /v1/code/receipts/authorshipandPOST /v1/code/receipts/test-run, recorded by an account for its own agent and bound to that agent's KYA identity.
Records are written by accounts (a live API key); sandbox keys never write to the public ledger. Reading every record and certificate is open to anyone, no key needed.
Observed changes (1 on the ledger)
Records are re-read on an operator schedule. When a reading differs from what a record states — a branch head that has moved since its commit was anchored, a license text that reads differently at the anchored commit — the difference is sealed as its own ledger record with both values and the observation time: /v1/code/changes. The same re-reading watches Rightshold's own rulebooks and production build, and those observations stand in the same list. An observation states that two readings differ; it does not state why.
Most recent
No code record has been requested yet. The first one will appear here, sealed in the ledger, the moment it is made.
