Skip to main content

build_payload

Function build_payload 

Source
pub fn build_payload(
    service_pointer: Vec<u8>,
    external_group_id: Vec<u8>,
    symmetric_key: [u8; 32],
) -> Result<ExternalInvitePayload, InvitePayloadError>
Expand description

Build an ExternalInvitePayload wrapping a ExternalInvitePayloadV1 with the supplied fields.

  • service_pointer — application-defined opaque bytes describing where the encrypted GroupInfo blob can be fetched.
  • external_group_id — service-slot identifier carried on the wire and verified by the joiner against the group’s EXTERNAL_COMMIT_POLICY.external_group_id after joining. MUST be at least MIN_EXTERNAL_GROUP_ID_LEN bytes; checked at construction so callers surface the error at the build site rather than at validate time.
  • symmetric_key — typically the output of generate_symmetric_key. Length is type-enforced.