feat(#626): emit the stock contact share URI
Adds Contact.toShareUri and the static Contact.buildShareUri, the inverse of #625's parser. Emitting the reference-app format is what makes an Offband card or QR importable by a stock, non-Offband user. buildShareUri takes raw parts rather than a Contact so the local device can share its OWN identity, which is a public key plus a node name and never a Contact instance. Spaces are percent-encoded rather than emitted as '+'. Both decode to a space, and this matches Channel.toShareUri, which the codebase already documents as round-tripping with the reference app's QR (#161). Tests cover the emitted parameter shape, the companion default, and round-tripping through fromShareUri for names with spaces, emoji and reserved characters. A raw & or = in a name would otherwise truncate or forge query parameters, so that case is pinned explicitly. Epic #619. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>fix/652-release-prerelease-flag
parent
007d0fb4f8
commit
bbea912cb0
Loading…
Reference in new issue