pub struct InviteParams {
pub services: Vec<String>,
pub app_label: Option<String>,
pub max_uses: Option<u32>,
pub peer_nickname: Option<String>,
}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.
peer_nickname: Option<String>YOUR local name for whoever redeems this invite (#87), overriding the nickname they claim for themselves in the ceremony.
The redeemer’s self-claimed name is usually its hostname, so two same-model laptops collide
and the pairing is refused with ERR_NICKNAME_TAKEN. Before this field the only fixes
were to ask the other person to rename their machine, or to unpair whoever holds the name.
This lets you just call them something else.
Local only: it is never sent to the peer and never affects what they call themselves or
you. It does not bypass the collision check — an alias that itself collides is refused
identically, because a duplicate display name makes your own <peer>/<service> routing
ambiguous whoever chose it.
Rejected with max_uses > 1: one alias applied to every redeemer of a multi-use invite
would collide on the second redemption, so it is refused at MINT rather than producing an
invite that works exactly once. api_minor >= 39.
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