Expand description
Helpers for a community owner, the holder of the root key (§4, ADR-0005, ADR-0011): the
genesis descriptor and host delegation, community.create, root rotation and descriptor
revisions. The root key never leaves the owner’s device; only signed objects do.
Structs§
- Descriptor
Content - The owner-editable, public fields of a descriptor (§4.1 fields 7–17).
- Genesis
- A signed genesis descriptor (revision 1) and the delegation it references (epoch 1).
- Host
Info - What an owner needs about a host to delegate to it (§4.2).
Functions§
- create_
body - The
community.createbody (§8.1): the genesis pair, the owner’s member key and its registration (purpose 1) for the host’s currenthost_challenge(from the welcome). - delegate
- Signs a delegation of every v1 scope (§4.2) to
host, valid fromnow_ms. - generate_
root_ key - Generates a fresh root key (§3.2): the community’s identity. Store it sealed; it cannot be recovered (ADR-0011).
- genesis
- Builds and signs the genesis pair: delegation epoch 1 to
host(no expiry, ADR-0005), descriptor revision 1 naming it, withowner_member_keyas the owner binding. - next_
revision - A copy of
currentwith the next revision andissued_at = now_ms, for the owner to edit and pass topublish_body. - publish_
body - Signs
descriptorwithroot(its current root key) and builds thecommunity.descriptor.publishbody. A givendelegationis referenced by the descriptor (epoch and hash) and sent; a giveniconsets the descriptor’s icon hash and is sent. - resign_
delegation - Re-signs an existing delegation under a new root key. The bytes, hence the
delegation_hashand epoch, are unchanged. - rotate_
root - Signs the rotation from the current root
oldtonew(§4.6):rotation_seqfollows the descriptor’s latest rotation, and both keys sign. - rotated_
revision - The next revision after
rotation: the new root key androtations = [rotation](§4.1 field 5). Sign it with the new key viapublish_body, together withresign_delegation: the delegation is verified under the current root (§4.3 rule 3).