pub struct PeerInfo {
pub name: String,
pub services: Vec<String>,
pub user_id: Option<String>,
pub principal: Option<String>,
}Expand description
A known peer as reported by status (nickname only — never the EndpointId).
Fields§
§name: String§services: Vec<String>§user_id: Option<String>The peer’s PROVEN self-sovereign user_id (b64u:<user_pk>) if it presented a verified
device->user binding at pairing (roster peers carry it too), else None (nickname-only). This
is a surface-clean identity (an opaque user id, NOT an EndpointId). Additive:
#[serde(default, skip_serializing_if = "Option::is_none")] so older payloads round-trip.
principal: Option<String>The peer’s stable DEVICE principal eid:<hex> (#41) — the SAME rendering the socket
backend injects into _meta["mcpmesh/peer"] and that appears in [services.*].allow.
Always present for a real peer (Option only for additive round-trip). Distinct from
user_id (the person-level b64u:, present only when the peer proved a binding): a
nickname is not unique, so an embedder keys caller-scoped decisions (dial the caller
back, “the requester’s own data”) on THIS, the authenticated endpoint. Machine-surface
authz vocabulary (like the allow lists) — human porcelain still shows the nickname.
Additive: #[serde(default, skip_serializing_if = "Option::is_none")].