diff --git a/messenger/index.html b/messenger/index.html index 3746bc7..e9a5059 100644 --- a/messenger/index.html +++ b/messenger/index.html @@ -1,242 +1,973 @@ - - - - - -hermes.x/messenger — browser messenger (preview) - - - - - - - - - -
- -

Messenger

-

Hermes in a browser tab — end-to-end encrypted DMs over Nostr, - addressed by on-chain registered name. The desktop client has - the richest flavour; the web messenger meets you where you are.

-
- -
-
-
- Preview. The desktop messenger inside Theseus - is live today — threaded chat, persistent history, address book, keyboard - shortcut Ctrl+Shift+E. The web-only client - (what this page becomes) is in development: BIP-39 → Nostr key derivation, - BCH-name resolution via gateway, NIP-17 wrap/unwrap, WebSocket to relays, - IndexedDB inbox. Everything client-side, nothing uploaded. -
-
- -
-
-
-
Hermes · hermes.x/messenger
- your npub: npub1ab…z89 - 1/1 relay -
-
- -
-
-
-
bob
-
023bf8c1…9ad2
-
-
-
-
hey, did you register your name yet?11:38
-
just now — bob.x is live11:40
-
nice. send me the hermes.x link11:42
-
https://hermes.x/messenger11:43
-
great, send me the link11:44
-
-
- - -
-
-
-
-
Non-interactive preview — live build pending (see roadmap below).
- -
- -
-

Two clients, one identity

-
-
-

Desktop (Theseus) live

-
    -
  • Full crypto in-process (NIP-17, nip44 v2)
  • -
  • Persistent inbox + read-state on disk
  • -
  • Address book (local JSON + vCard import)
  • -
  • Sidebar panel, Ctrl+Shift+E shortcut
  • -
  • Vault-bind: no re-typing the mnemonic
  • -
  • Reverse-resolve pk → on-chain name
  • -
- -
-
-

Web (this page) building

-
    -
  • Same crypto, same identity (same wallet seed derivation)
  • -
  • BCH name resolution via public gateway
  • -
  • WebSocket to Nostr relays from the browser
  • -
  • IndexedDB inbox — survives tab close, scoped to this origin
  • -
  • No download, no install, no account
  • -
  • Mnemonic entry only — never stored in plaintext
  • -
- -
-
-
- -
-

Why wait for the web client

-

The web messenger isn't ready yet because of three things we - want to get right before shipping:

-
    -
  1. Key handling in a tab. - A wallet mnemonic is the most sensitive bit of data a user has. In - the desktop app it lives in main-process memory; in a tab it has to - survive page reloads without ever landing in plaintext anywhere. We're - wiring a WebCrypto-backed non-extractable key path with the vault PIN - as the gate.
  2. -
  3. Resolver gateway. - The desktop talks to a chipnet Fulcrum directly. A browser can't - — it needs an HTTPS gateway that answers np - / nr for a name. The gateway is live - (navigate.st/api/dns/alice.x) but the - client-side cache + signature-verification path still has an edge case - with lapsed names.
  4. -
  5. Relay persistence. - Desktop keeps a long-lived WebSocket to each relay. A tab doesn't, - because browsers throttle background sockets. The web client needs - offline queueing and a well-defined "catch-up" fetch on return — - otherwise you re-open the tab and the inbox feels empty.
  6. -
-

Until the three are solid, install Theseus for the real thing. - The web client will land here when the above are green.

- -
- -
- - - - - + + + + +Hermes.X — Messenger + + + + + + + + + + + + + + + +
+ + +
+ +
Hermes
+
+
—
+ + +
+ + + + + + + + +
+ +

Hermes

+

End-to-end encrypted DMs. Your identity is your on-chain registered name — same wallet seed as Theseus.

+
+ + + +
+
+ + + + +
You'll get a hermes:alice handle. We'll generate a seed phrase — back it up in Settings.
+
+
+ + +
+
+
+
You'll stay signed in. Sign out from the ⋯ menu.
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
Pick a conversation, or add a new one.
+ +
+
+
+ + + + +
+ + + + diff --git a/messenger/shim.js b/messenger/shim.js new file mode 100644 index 0000000..3be717b --- /dev/null +++ b/messenger/shim.js @@ -0,0 +1,536 @@ +// Browser host-shim for the Hermes messenger panel. +// +// The panel UI (panel.html inside Theseus) talks to the Theseus main process +// over an IPC bridge exposed as window.silentmode. This shim re-implements +// that bridge in a plain browser tab: NIP-17 wrap/unwrap with nostr-tools, +// Nostr pubkey + relay lookup via navigate.st/api/name, inbox + contacts in +// localStorage. +// +// Why this works at all: the panel calls bridge.invoke(name, payload) and +// awaits a promise, and subscribes with bridge.on(channel, cb). Every op is +// a pure function of the panel's state, the user's secret key, and a WSS +// connection — no Node, no filesystem, no Electron. The real Theseus host +// adds vault binding, mnemonic persistence and backup; the browser can +// never promise any of that, so the shim stubs those paths and surfaces an +// honest error when the panel asks. +// +// Scope v0 (2026-10-21): +// - nsec1… paste and BIP-39 12/24-word paste both go in `mnemonicInput` +// - one default relay: wss://nos.lol (matches Theseus HERMES_DEFAULT_RELAYS) +// - send resolves `alice.x` → np+nr via /api/name +// - receive via a single long-lived REQ subscription +// - inbox + contacts in localStorage, scoped by `hermes..*` +// - no profile fetch (truncated pkHex shows); phone/backup/vault stubbed +// +// Keep this file plain classic script. The panel's own