Skip to main content

Module invite

Module invite 

Source
Expand description

Phase C: invite-link encoding / decoding.

Format: huddle://invite#<base64url-no-pad JSON>. The fragment (#) keeps the payload out of HTTP Referer headers if someone pastes through a web form somewhere.

What’s in the JSON:

  • host_multiaddr: the dial target, WITH /p2p/<peer-id> suffix — libp2p enforces remote-pubkey-matches-this on dial, so this is the actual MITM defense (not the fingerprint string below).
  • fingerprint: the host’s 24-char Ed25519 fingerprint, shown in the confirmation modal so the receiver can verify (“yep, that’s the fp Alice texted me out-of-band”).
  • room: optional — when present, the receiver auto-joins after the dial completes and the room announcement arrives.

Important: the passphrase is NEVER in the link. Encrypted rooms still require the joiner to type the passphrase separately; including it would defeat the point of OOB sharing.

Structs§

InviteLink
InviteRoom

Constants§

INVITE_PREFIX

Functions§

decode
Parse a huddle://invite#... URL back into an InviteLink.
encode
Build the huddle://invite#... URL form from a parsed InviteLink.