pub struct CommunityInvite {Show 13 fields
pub community_id: String,
pub owner: String,
pub owner_salt: String,
pub community_root: String,
pub root_epoch: u64,
pub channels: Vec<ChannelGrant>,
pub relays: Vec<String>,
pub name: String,
pub icon: Option<ImageRef>,
pub expires_at: Option<u64>,
pub creator_npub: Option<String>,
pub label: Option<String>,
pub extra: Map<String, Value>,
}Expand description
The CommunityInvite bundle (CORD-05 §1). Field names are wire-frozen and
shared with Soapbox/Armada; a rename is a silent cross-client join failure.
Fields§
§community_id: Stringsha256("concord/community" || owner || owner_salt) — self-certifies the owner.
owner: StringOwner x-only pubkey (32-byte hex).
owner_salt: StringOwner salt (32-byte hex).
community_root: StringThe base access key (32-byte hex) at root_epoch.
root_epoch: u64§channels: Vec<ChannelGrant>§relays: Vec<String>§name: StringPreview name so a parked invite renders; the Control fold is the authority.
icon: Option<ImageRef>§expires_at: Option<u64>Optional, unix ms: past it the preview still renders, joining refuses.
creator_npub: Option<String>Optional attribution, echoed in the joiner’s Guestbook Join (CORD-05 §1).
label: Option<String>§extra: Map<String, Value>Unknown fields round-trip verbatim (CORD-02 §6) — carries other clients’
bundle extensions (held_roots, refounder, …) through untouched.
Implementations§
Source§impl CommunityInvite
impl CommunityInvite
Sourcepub fn from_bundle_json(json: &str) -> Result<Self, InviteError>
pub fn from_bundle_json(json: &str) -> Result<Self, InviteError>
Parse + bound + validate a decrypted bundle, whichever lane carried it:
truncate relays to the Community cap, reject an over-count of Channels
before trusting it, and verify the owner commitment.
Sourcepub fn validate(&self) -> Result<(), InviteError>
pub fn validate(&self) -> Result<(), InviteError>
The self-certifying owner check (CORD-02 A.4) plus the Channel bound — a mismatching bundle is refused, so even a compromised creator can’t smuggle a false owner or a fake key for a real Community.
Trait Implementations§
Source§impl Clone for CommunityInvite
impl Clone for CommunityInvite
Source§fn clone(&self) -> CommunityInvite
fn clone(&self) -> CommunityInvite
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommunityInvite
impl Debug for CommunityInvite
Source§impl<'de> Deserialize<'de> for CommunityInvite
impl<'de> Deserialize<'de> for CommunityInvite
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>,
Source§impl PartialEq for CommunityInvite
impl PartialEq for CommunityInvite
Source§impl Serialize for CommunityInvite
impl Serialize for CommunityInvite
impl StructuralPartialEq for CommunityInvite
Auto Trait Implementations§
impl Freeze for CommunityInvite
impl RefUnwindSafe for CommunityInvite
impl Send for CommunityInvite
impl Sync for CommunityInvite
impl Unpin for CommunityInvite
impl UnsafeUnpin for CommunityInvite
impl UnwindSafe for CommunityInvite
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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