pub struct Invite {
pub invite_type: String,
pub repo_name: Option<String>,
pub repo_id: Option<String>,
pub head_cid: String,
pub wrapped_key: WrappedKey,
pub for_recipient: SigningPubKey,
pub from_owner: SigningPubKey,
pub created_at: u64,
pub signature: Vec<u8>,
}Expand description
A lightweight invite blob for contributor onboarding.
Stored as JSON, pinned to IPFS as a CID. Contains an ECIES-wrapped repo key for a specific recipient, signed by the repo owner.
Fields§
§invite_type: StringMagic identifier for detection: “void-invite/v1”
repo_name: Option<String>Human-readable repo name.
repo_id: Option<String>Stable repo identifier (UUID).
head_cid: StringCommit CID to clone from (string-encoded CID).
wrapped_key: WrappedKeyECIES-wrapped repo key for the recipient.
for_recipient: SigningPubKeyRecipient’s signing pubkey (who this invite is for).
from_owner: SigningPubKeyOwner’s signing pubkey (who created the invite).
created_at: u64Unix timestamp (seconds since epoch).
signature: Vec<u8>Ed25519 signature from owner over signable fields.
Implementations§
Source§impl Invite
impl Invite
Sourcepub fn signable_bytes(&self) -> Vec<u8> ⓘ
pub fn signable_bytes(&self) -> Vec<u8> ⓘ
Build the canonical byte sequence for signing/verification.
Format: type || head_cid || wrapped_key || for_recipient || from_owner || created_at
Each field is length-prefixed (4-byte little-endian length + bytes).
Sourcepub fn sign(&mut self, signing_key: &SigningKey)
pub fn sign(&mut self, signing_key: &SigningKey)
Sign this invite with the owner’s Ed25519 signing key.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Invite
impl<'de> Deserialize<'de> for Invite
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 Invite
impl RefUnwindSafe for Invite
impl Send for Invite
impl Sync for Invite
impl Unpin for Invite
impl UnsafeUnpin for Invite
impl UnwindSafe for Invite
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> 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