Expand description
Invite-URL pair flow (v0.4.0). Single-paste, zero-config pairing.
Flow:
A: wire invite → URL.
A pastes URL into any channel (Discord, SMS, voice-read).
B: wire accept <URL> → done. Both pinned.
The invite URL is a self-contained bearer credential carrying A’s signed
agent-card, relay coords, slot_token, and a single-use pair_nonce. B parses
it locally (no relay round-trip yet), pins A from the URL contents, then
POSTs a signed kind=1100 pair_drop event to A’s slot using the slot_token
the URL granted. A’s daemon (run_sync_pull) recognizes pair_drop events
that carry a matching pending_invite nonce, verifies the embedded card,
pins B, and consumes the nonce. Both sides paired.
Trust model: pasting = trusting. Equivalent to Discord invite link, Zoom join URL, Signal group invite. Operator’s act of moving the URL between channels IS the authentication ceremony. No SAS digits, no PAKE.
The legacy SPAKE2 + SAS flow remains available via wire pair --require-sas
for operators who want the stronger MITM-resistance model.
Structs§
- Invite
Payload - Decoded contents of an invite URL.
- Pending
Invite - On-disk record for a minted invite, awaiting acceptance.
Constants§
Functions§
- accept_
invite - Accept an invite URL. Auto-inits + auto-allocates if needed. Pins issuer from URL contents, then POSTs a signed pair_drop event to issuer’s slot.
- ensure_
self_ with_ relay - Ensure this node has an identity + relay slot. Idempotent. Returns (did, relay_url, slot_id, slot_token).
- maybe_
consume_ pair_ drop - Consume a pair_drop event during daemon pull. Returns
Ok(Some(peer_did))if the event matched a pending invite and the peer was pinned. ReturnsOk(None)if not a pair_drop or no matching invite. Errors only on real problems (bad sig over event, IO failure). - maybe_
consume_ pair_ drop_ ack - Consume a
pair_drop_ackevent during daemon pull. Updates relay-state.peers[] with the ack’s slot_token so we can wire sendto the peer. ReturnsOk(true)if applied. Idempotent. - mint_
invite - Mint a fresh invite URL. Auto-inits + auto-allocates relay slot if needed.
- parse_
invite - Parse an invite URL and verify the embedded signature against the embedded card’s first active verify key.
- pending_
invites_ dir