The Annon protocol
The protocol is the specification and its test vectors. defdone maintains a reference implementation: the NEAR contract, the SDK, the command line and the MCP server. Anyone can implement it or run their own contract.
DraftsWhat changedPropose a change
Documents
To write your own implementation, read them in this order and check your output against the test vectors. Each is a page here and plain Markdown at the same address plus .md.
- 1
Identities, terms, the purchase commitment, settlement, refunds, recovery
Draft 3, 11 Nov 2026
near-settlement.md - 2
The encrypted file format
PAY2 version 2
pay2.md - 3
The purchase ID and the Base payment nonce
Domains annon/purchase/v2, annon/base-payment/v2
nonce.md - 4
The Annon profile for x402 v2
Extension version 3
x402-annon.md - 5
Downloads proved by a purchase grant
Follows near-settlement.md
download.md
Status and versions
All documents are drafts. They describe what the contract v1.annon.defdone.near and the 0.1.0-alpha.N packages do today.
An incompatible change is still possible
During the alpha the contract can be upgraded (SECURITY.md), so an incompatible change is still possible. Our versioning rule: an incompatible format change gets a new version number (PAY2 byte 4, extensions.annon.info.version or a hash domain string), and an old number never gets a new meaning. Clients refuse versions they do not know.
The documents become stable when the contract is locked after an independent audit. The formats of a locked contract do not change; a new protocol version comes with a new contract.
Security and the upgrade key
Proposing changes
Annon is an open protocol. Start a discussion with a proposal for a specification or the contract. We review every proposal and either adopt it or work it out there in the open. Security problems go through private reporting (SECURITY.md).
Start a discussion
Test vectors
Bytes, texts and hashes every implementation must reproduce, valid and invalid. A spec that cites vectors/pay2.json means the file below. The generators that write them are in the source on GitHub.
Implementations
An implementation must follow the specification, reproduce every valid test vector and reject every invalid one. Built your own? Start a discussion to have it listed here.