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§
- Invite
Payload - The canonical
InvitePayload(§8.6). Unsigned: after connecting, the welcome must show a descriptor derivingcommunity_id, a delegation naminghost_id, and a host proof — whichInvitePayload::session_configmakes the session check. - Moved
- A verified move: the new pair (store its state) and how to reach the new host.
- Reauth
Target - Where a member re-authenticates: the community, the new host, the delegation epoch its verified welcome proved, and that welcome’s challenge.
- Registration
Target - Where a registration is made: the community, the host and the welcome’s challenge.
Enums§
- Link
Error - 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_updatedevent 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.chainis the rotation chain the client holds; a rotation embedded in the new descriptor extends it, as at the host. - reauth_
body - The
migration.reauthbody: aMemberReauthsigned with the member’s existing key. Send it withtarget.community_idas the envelopecommunity_id. - redeem_
body - The
invite.redeembody (§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 envelopecommunity_id. - registration
- Signs a
MemberKeyRegistration(§4.4) with the member key itself. - request_
body - The
membership.requestbody (§8.9) with a purpose-3 registration. Send it withtarget.community_idas the envelopecommunity_id(§7.1).