pub struct SignedInvite {
pub group_id: String,
pub stable_group_id: Option<String>,
pub group_created_at: Option<u64>,
pub group_name: String,
pub group_description: Option<String>,
pub policy: Option<GroupPolicy>,
pub genesis_creation_nonce: Option<String>,
pub inviter: String,
pub invite_secret: String,
pub created_at: u64,
pub expires_at: u64,
pub signature: String,
}Expand description
A signed invite token for joining a group.
Tokens are serialized to base64url for sharing via email, chat, QR codes, etc.
The format is: x0x://invite/<base64url(json(SignedInvite))>
Fields§
§group_id: StringMLS group ID (hex-encoded).
stable_group_id: Option<String>Stable D.3 group_id, if known.
group_created_at: Option<u64>Authority-created timestamp for the group.
group_name: StringHuman-readable group name.
group_description: Option<String>Human-readable group description.
policy: Option<GroupPolicy>Full policy snapshot used to seed the joiner’s local GroupInfo.
genesis_creation_nonce: Option<String>Authority genesis nonce so invite-joined peers reconstruct the same
GroupGenesis payload, not just the same stable group id.
inviter: StringAgent ID of the inviter (hex-encoded).
invite_secret: StringOne-time invite secret (32 bytes, hex-encoded). Used to authenticate the join handshake.
created_at: u64Unix seconds when this invite was created.
expires_at: u64Unix seconds when this invite expires (0 = never).
signature: StringOptional future-facing ML-DSA-65 signature over the invite fields (hex-encoded). Currently not validated by the join flow.
Implementations§
Source§impl SignedInvite
impl SignedInvite
Sourcepub fn new(
group_id: String,
group_name: String,
inviter: &AgentId,
expiry_secs: u64,
) -> Self
pub fn new( group_id: String, group_name: String, inviter: &AgentId, expiry_secs: u64, ) -> Self
Create a new invite (without signature — call sign() separately).
§Arguments
group_id- MLS group ID (hex).group_name- Human-readable group name.inviter- Inviter’s agent ID.expiry_secs- Seconds until expiry (0 = never).
Sourcepub fn signable_bytes(&self) -> Vec<u8> ⓘ
pub fn signable_bytes(&self) -> Vec<u8> ⓘ
Get the canonical bytes that would be signed if invite signatures are enforced in the future.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if this invite has expired.
Trait Implementations§
Source§impl Clone for SignedInvite
impl Clone for SignedInvite
Source§fn clone(&self) -> SignedInvite
fn clone(&self) -> SignedInvite
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SignedInvite
impl Debug for SignedInvite
Source§impl<'de> Deserialize<'de> for SignedInvite
impl<'de> Deserialize<'de> for SignedInvite
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SignedInvite
impl RefUnwindSafe for SignedInvite
impl Send for SignedInvite
impl Sync for SignedInvite
impl Unpin for SignedInvite
impl UnsafeUnpin for SignedInvite
impl UnwindSafe for SignedInvite
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more