Expand description
The registry protocol’s data (packaging slice 4a, #2274, decision D; track
design/tracks/packaging.md §6.1): a registry’s config.json, its index
lines, and the canonical payloads their signatures cover.
I/O- and crypto-free (first-party registry R2, #2336, decision B), so the
client, the reference server and the hosted registry’s wasm module build
the very same bytes. Signature checks take a verify function: bynk
passes one over ring, and the hosted registry verifies with bynk.crypto.
A key is written ed25519:<base64 of the 32-byte public key>, and its
fingerprint ed25519-fp:<base64 of sha256(public key)>.
Structs§
- Config
- A registry’s
config.json. - Index
Line - One version line of a package’s index file.
- KeyEntry
- One link of the key-rotation chain: a key, and (after the first) the
previous key’s signature over
{ "key": …, "registry": id }. - Requirement
- A dependency or npm requirement in an index line. A dependency or npm requirement in an index line.
- Signers
- #2316: who may sign a registry’s index lines.
Constants§
- PROTOCOL
- The protocol version a registry without delegation speaks.
- PROTOCOL_
DELEGATION - #2316 (D): the protocol version a
config.jsonwithdelegationsorrevokedmust declare; this toolchain reads both. - WITHDRAWN_
MAX - #2330 (A): the longest
withdrawnreason, in characters.
Functions§
- canonical
valueas canonical JSON: object keys in byte-wise order (serde_json’s map is ordered unlesspreserve_orderis on, so keys are re-sorted here regardless), no insignificant whitespace.- delegation_
payload - #2316: the payload a delegation’s signature covers.
- fingerprint
ed25519-fp:<base64 of sha256(public key)>.- key_
bytes - The raw public key of
ed25519:<base64>. - revocation_
payload - #2316: the payload a revocation’s signature covers.
- rotation_
payload - The payload a rotation link’s signature covers.
Type Aliases§
- Verify
- Whether
sig(base64) iskey’s signature overpayload: the check the signer walks below are given.