pub struct InviteParams {
pub services: Vec<String>,
pub app_label: Option<String>,
pub max_uses: Option<u32>,
}Expand description
Params of Request::Invite: the services the minted invite grants. Rejects unknown
fields (so {service: "kb"} — a singular typo — is a loud error, not a silently
grants-nothing invite), and the daemon additionally rejects an empty/absent services
list (an invite that grants nothing is useless — #34).
Fields§
§services: Vec<String>§app_label: Option<String>An OPAQUE, caller-chosen label carried through to the redeemer in the pair result (#31).
mcpmesh never interprets it (not a nickname, never resolved or authorized) — a per-pairing
metadata slot for the embedder (e.g. its own URN). Capped at the daemon; omit for none.
max_uses: Option<u32>How many times this invite may be redeemed (#87). Absent = 1, the single-use behaviour every existing caller already gets.
Each redemption runs its OWN SAS ceremony and writes its own mutual peer rows — this is not a shared or group identity, it is N independent pairings that happen to share one secret. Onboarding a team stops being N mint-and-send rounds.
Clamped to MAX_INVITE_USES; 0 is rejected rather than silently meaning “unusable”. A
bearer credential’s blast radius is max_uses × TTL, so it is opt-in and capped on purpose.
The value actually applied comes back in InviteResult::uses_remaining — read that rather
than assuming you got what you asked for.
api_minor >= 35, and sending it to an older daemon FAILS rather than degrading.
InviteParams is deny_unknown_fields, so an api_minor < 35 daemon answers -32602 unknown field 'max_uses' — it does not quietly mint a single-use invite. Loud is the right
behaviour; omit the field entirely when talking to one.
Trait Implementations§
Source§impl Clone for InviteParams
impl Clone for InviteParams
Source§fn clone(&self) -> InviteParams
fn clone(&self) -> InviteParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more