# Implementations

A self-reported list of software that implements the REFERRALS.md format. Inclusion says only that someone said so. Nobody here reviews, tests or endorses an entry, and a level is a statement an implementer makes about its own software. There is no badge program and no one to apply to.

**The format stays a draft until two implementations not written by its authors pass the vectors.** As of this page, there are none. No standards body stands behind this format, and nobody has adopted it unless they say so.

## The list

| Name | Language | Level | Vectors | Date | Self-tested by | Link |
|---|---|---|---|---|---|---|
| Reference library, `referrals.mjs` | JavaScript, no dependencies | L0 to L4 | format 3 | 2026-10-30 | The format's authors, so it does not count toward the two above | https://referrals.md/referrals.mjs |

The reference library's results are the authors' own. Its code is MIT and comes with no warranty. Read it before you run it. Its sha256 is in the `X-Content-SHA256` header.

## Add yours

1. Get `/vectors.json`. It holds inputs and exact outputs for each level, with test keys marked as test keys. Each vector names an `op`, and its `ops` section says what that op does.
2. Run your software on each input, and collect your outputs by vector id.
3. Compare them with the `self_test` tool, hosted or in the local library. It lists what differs. The results are your own.
4. Publish your run somewhere anyone can read it.
5. Send the name, language, level, vectors version, date and a link to your run through https://referrals.md/feedback.

An entry says "self-tested" and makes no other claim. If the vectors are wrong, or the spec and the vectors disagree, say so the same way. A finding like that is useful.

## Levels

| Level | An implementation can |
|---|---|
| L0 Publisher | Write a valid program or policy file. No hashing |
| L1 Emitter | Also expand records, compute ids, mint and parse tokens |
| L2 Calculator | Also compute attributions and accruals byte-identical to `/vectors.json`. L2-core covers `flat`, `percent`, `per_unit`, `last_touch`, `first_touch`, `linear`, windows, `once_per`, `recurring` and reversals. Features in `crit` are extra, and a vector that needs one says so |
| L3 Ledger | Also check chains, build statements and proofs, reconcile |
| L4 Signed | Also sign and check Ed25519 tokens, records and signoffs |
