Expand description
Real-npub authority editions — the keyless model’s authorship + version carrier.
An authority change (a Grant, RoleMetadata, RoleOrder, Banlist, …) is an inner event signed
by the ACTOR’s own npub, carrying the entity id, a per-entity
version, and the previous edition’s hash (prev_hash, see super::version). That inner event
lives inside the channel/server-root encryption (the outer wrapper is the usual ephemeral signer,
super::envelope), so authorship is member-verifiable: the inner Schnorr signature is the
proof of who acted, and members check that npub against the roster.
This module is the wire encoding of one edition (build + verify + parse). It does NOT decide
authorization — the signature proves WHO acted; the roster (§roles) decides WHETHER they were
allowed, and super::version::fold decides which edition is current.
Structs§
- Authority
Citation - The pinned authority an actor claims for an action (mechanism a). Points at the actor’s own authorizing edition (their Grant — or a RoleMetadata for a role-position claim) by stable coordinate + the exact version/hash, so the verifier resolves authority against that frozen point, not its own possibly-lagging-or-ahead live roster.
- Parsed
Edition - A signature-verified, parsed edition.
Enums§
Constants§
- TAG_
AUTHORITY_ CITATION - Authority citation tag:
["vac", <authorizing-entity hex>, <version>, <edition-hash hex>]. The “pinned proof” — the grant edition the actor claims their authority under. In the MVP it is a COMPLETENESS floor: a verifier confirms it has synced that exact grant to ≥ the cited version (an un-forked, complete view) before acting, and resolves the actor’s actual rank against its current (refuse-downgrade-protected) roster — so a since-demoted actor is dropped there. The full “resolve rank AT the cited version” (block-until-synced re-fetch + a roster-wide snapshot version) is the deferred refinement; today it pins the actor’s own grant, not a whole-roster moment. Absent when the OWNER acts (supreme, no grant to cite).
Functions§
- build_
edition_ inner - Build the unsigned inner edition event. Sign it with the ACTOR’s real identity keys — that
signature is the authorship proof.
entity_idis the entity’s 32-byte id,prev_hashis the previous edition’sversion::edition_hash(Nonefor the first edition),contentis the entity payload JSON, andcreated_at_secsis the authored time (the version-fold tiebreak). - parse_
edition_ inner - Verify + parse an inner edition event. Checks the inner Schnorr signature (the real-npub
authorship proof) and extracts the edition fields, computing
self_hashover the canonical edition bytes. Does NOT check roster authorization — that is the caller’s separate step.