Skip to main content

Module member

Module member 

Source
Expand description

Helpers for a member: a fresh community-scoped key (§6.1: never reused), its registration for invite.redeem / membership.request (§4.4), invitation links (§8.6), and following the community to a new host (migration.reauth).

Structs§

InvitePayload
The canonical InvitePayload (§8.6). Unsigned: after connecting, the welcome must show a descriptor deriving community_id, a delegation naming host_id, and a host proof — which InvitePayload::session_config makes the session check.
Moved
A verified move: the new pair (store its state) and how to reach the new host.
ReauthTarget
Where a member re-authenticates: the community, the new host, the delegation epoch its verified welcome proved, and that welcome’s challenge.
RegistrationTarget
Where a registration is made: the community, the host and the welcome’s challenge.

Enums§

LinkError
A link that is not a valid invitation. Carries no part of the input.

Constants§

INVITE_LINK_PREFIX
The link scheme and path.

Functions§

generate_member_key
Generates a fresh member key. Use one per community (§6.1, ADR-0005).
moved
Checks a community.descriptor_updated event against the client’s stored state (§4.3, with anti-rollback: a lower revision or delegation epoch is refused) and says whether the community moved to another host. chain is the rotation chain the client holds; a rotation embedded in the new descriptor extends it, as at the host.
reauth_body
The migration.reauth body: a MemberReauth signed with the member’s existing key. Send it with target.community_id as the envelope community_id.
redeem_body
The invite.redeem body (§8.6): the link’s secret, the member key and its registration (purpose 2) for the link’s community and host. Send it with the link’s community as the envelope community_id.
registration
Signs a MemberKeyRegistration (§4.4) with the member key itself.
request_body
The membership.request body (§8.9) with a purpose-3 registration. Send it with target.community_id as the envelope community_id (§7.1).