Skip to main content

Module component_source

Module component_source 

Source
Expand description

Single source-of-truth for the per-ComponentId read/encode/apply logic.

Centralizes everything the rest of the MLS pipeline needs to know about a well-known ComponentId: its logical ComponentType, where its current bytes live (OpenMLS AppData dictionary vs. legacy group context extensions), and how to encode/apply AppDataUpdate payloads.

The module declaration is pub only so ComponentSourceError can satisfy the private_interfaces lint on the public GroupError variant it’s embedded in. All helpers remain pub(crate).

§Inbox-id encoding

The legacy GMM extension stores inbox ids as 64-character hex strings. Anything serialized through the new AppDataUpdate path uses the versioned InboxId newtype instead — the legacy on-the-wire format is left untouched for unmigrated groups.

See xmtp_mls_common::inbox_id for the full wire-format contract; the short version is varint(version) || 32-byte payload, with version 0 producing a 33-byte encoding.

Enums§

ComponentSourceError
Errors surfaced by the component_source layer.