theseus/lib
Local Dev 5e27a1b53d hermes: phone discovery (opt-in), lookup contacts by number
Users can link one or more phone numbers to their Hermes identity by
publishing a kind:30078 claim event whose d-tag is a SHA-256 hash of the
E.164 number. The number itself never leaves the device. Add-contact and
message-send now also accept a +phone input directly — the client hashes it
and queries relays for the matching Hermes identity.

- lib/hermes.js: normalisePhone(str) strips separators + a leading 00
  into E.164, rejects anything that doesn't fit +[country][7-15 digits].
  hashPhone(str) → base64url-truncated-to-32 SHA-256 digest, used as the
  d-tag suffix under PHONE_DTAG_PREFIX. buildPhoneClaimEvent /
  buildPhoneRetractEvent emit the signed kind:30078 / NIP-09 kind:5.
- main.js: _hermesAPI.getPhone / setPhone / clearPhone / findByPhones.
  Plaintext phone persists in the identity meta (locally only) so the
  user can see what's linked and retract it; event ids are kept so a
  retract can reference the exact wire event. hermesResolveTo takes a
  phone-shaped input and does the discovery lookup transparently, so
  contactsAdd and send accept phones without a new entry point.
- panel.html: Settings → Phone discovery (link / unlink + privacy note),
  add-contact placeholder now lists +phone alongside the other forms.

Privacy stance stated in the UI: "anyone who already knows your number
can find you — same tradeoff as number-based messengers." No PSI tricks
yet; plain hash. Users who don't want it just don't link, which is the
default. Future slice can add a pepper if operators want to narrow the
brute-force window.
2026-10-21 17:21:16 +03:00
..
resolvers Theseus 0.3.98: Namecoin + Handshake adapters 2026-10-21 02:40:33 +03:00
addon-sandbox-runner.cjs Theseus: community extensions run in their own sandboxed process 2026-10-05 22:54:26 +02:00
addon-store.cjs Theseus: add-on stores live in memory — no more 16 s "Not Responding" at launch 2026-10-03 16:08:22 +02:00
hermes.js hermes: phone discovery (opt-in), lookup contacts by number 2026-10-21 17:21:16 +03:00
package.json Hermes: wire NIP-17 messaging into Theseus, provision chipnet hermes.bch 2026-08-18 20:14:43 +02:00
publisher-sig.mjs feat: community extensions — publish with a BCDN name, install from Settings, theseus.x catalog 2026-09-20 15:26:30 +02:00
signin-sites.cjs Vault: PIN setup steps, 6-8 digit PINs, save and offer logins, keep sign-ins 2026-10-04 20:23:43 +02:00
theseus-id.cjs Theseus ID in Theseus: window.theseusId.signIn and Settings › Theseus ID 2026-10-04 20:48:07 +02:00
tpm-pin.cjs Vault PIN: tie it to the TPM and never store it unsealed 2026-10-04 03:42:02 +02:00
update-helper.cjs Theseus: close the Settings-tab vault leak and the add-on update signer bypass 2026-10-03 09:50:10 +02:00
vault-pin.cjs Vault: PIN setup steps, 6-8 digit PINs, save and offer logins, keep sign-ins 2026-10-04 20:23:43 +02:00