Expand description
The v2 Control Plane (CORD-04 over CORD-01/02).
Editions use the vsk/eid/ev/ep/vac tags, the frozen edition_hash
(community::version, label vector-community/v1/edition, which upstream froze
verbatim), and the shared fold rules, riding the stream envelope: a kind-3308
UNSIGNED rumor inside a plaintext seal (20014) at control_pk. Authorship is
the seal’s signature: super::stream::open_wrap Schnorr-verifies the seal and pins
rumor.pubkey == seal.pubkey, so by the time an edition is parsed here its
author is already proven. The plaintext seal is load-bearing: a compaction
re-wraps the signed seal into a new epoch byte-verbatim, and the signature
(over the rumor string) survives — an encrypted seal could not.
Two deliberate wire choices:
- editions carry NO
["v","1"]protocol tag (frozen derivations partition protocol revisions by address; version tags are the rejected mechanism). - the owner is proven by the self-certifying
community_idcommitment (super::derive::verify_community_id), not an attestation event — vsk 7 is retired.
Structs§
- Category
Metadata - A Category (vsk 15, CORD-03 §4),
eid == category_id, gated byMANAGE_CHANNELS. Deletion is terminal. - Channel
Metadata - Channel metadata — the vsk-2 entity content (CORD-03 §2).
eid= the channel_id; gated byMANAGE_CHANNELS. Absent flags mean false; deletion is terminal. - Community
Identity - A v2 community’s self-certifying identity triple. The id IS the owner commitment — carry all three together and verify before trusting any claim.
- Community
Metadata - Community metadata — the vsk-0 entity content (CORD-02 §6).
eid= the community_id itself; gated byMANAGE_METADATA. - Control
Plane - The Control Plane as this member holds it for one epoch.
- Genesis
- The two wraps of a community genesis — exactly two owner-signed editions:
the community metadata (vsk 0) and one public
#generalchannel (vsk 2). Nothing more — no default roles, no scaffolding. - Image
Ref - An encrypted-blob image pointer (icon/banner): the media server sees only an
opaque blob; members fetch, decrypt with
key/nonce, and verifyhash. - Sealed
Channel Meta - A Private Channel’s sealed metadata edition (CORD-03 §2): what every member needs to resolve
access stays plain; the rest is sealed under the Channel’s key at
epoch.
Enums§
- Control
Error - Errors from the control plane layer (envelope errors ride inside).
Constants§
- MAX_
DESCRIPTION_ BYTES - UTF-8 byte cap on a community description.
- MAX_
NAME_ BYTES - Protocol-wide UTF-8 byte cap on names (community, channel, role).
- MAX_
TOPIC_ BYTES - A Channel’s topic cap (CORD-03 §2).
Functions§
- build_
edition_ rumor - Build the unsigned kind-3308 edition rumor (no protocol
vtag). Control editions carry nomstag: they fold by version, not time. - build_
edition_ rumor_ bound build_edition_rumor, marked and bound to a Community (binding) when one is given: what every edition of a Community on Roles v2 carries.- cut_
name - A name past the 64-byte cap, cut to the last whole character within it: what a reader shows.
- genesis
- Mint a v2 community: fresh identity (salt-committed to the owner), fresh community_root + control_root (the split, CORD-02 §2), and the two genesis editions sealed at the epoch-0 control plane — signed by the control_root- derived signer, readable under the community_root-derived read key. The caller persists the secrets and publishes the wraps.
- genesis_
signed - Signer-driven twin of
genesisfor bunker / NIP-55 accounts: mints from the owner’s public key and seals the two genesis editions through aVectorSigner.owner_pkmust equalmy_public_key()(the identity the signer signs as). - open_
control_ edition - Open a control-plane wrap into a verified, parsed edition. Strict on both gates: the rumor must be kind 3308, and the seal must be the plaintext form.
- open_
sealed_ channel_ meta - Open sealed channel metadata with the conversation key of its epoch.
previs the carrying edition’s predecessor, which the seal must name; a deletion carries an older seal verbatim and is exempt. - parse_
edition_ rumor - Parse an edition from an ALREADY-VERIFIED rumor (one produced by
stream::open_wrap, which proved the seal signature, the author binding, and the rumor id). No signature lives on the rumor itself — never feed this a rumor that didn’t come through the stream verifier. - parse_
sealed_ channel_ meta - The sealed form of a channel edition,
Nonefor the plain form or a malformed one. - sanitize_
channel_ metadata metawith whatever breaks the protocol caps dropped, the name cut to fit: what folds is shown, and what a writer re-seals must validate.- seal_
channel_ metadata - Seal a Private Channel’s metadata under its conversation key at
epoch, naming the edition’s predecessor so the seal can’t be replayed as a newer edition. - seal_
control_ edition - Seal a signed-by-
author_keysedition rumor into a control-plane wrap. Local-keys convenience; bunker accounts usestream::seal_content+ their remote signer +stream::wrap_sealfor identical wire output. - seal_
control_ edition_ signed - Signer-driven twin of
seal_control_editionfor bunker / NIP-55 accounts: the plaintext seal signs through aVectorSigner.authoris the identity the signer signs as (must equalmy_public_key()). Wire-identical output. - sealed_
tombstone - A sealed edition’s content republished verbatim beside
"deleted": true: deleting a Private Channel takes only the bit, never the key. - split_
write_ group - The SPLIT write group for a freshly minted epoch (genesis / a Refounding’s
new plane): the
control_root-derived signer with thecommunity_root- derived read key (CORD-02 §5). - validate_
category_ metadata - validate_
channel_ metadata - validate_
community_ metadata - Enforce the protocol byte caps before an edition is built (a strict reader may drop over-cap state; never publish what peers would refuse).