hermes.x � the standalone website for the Hermes NIP-17 messenger.
The Hermes sidebar panel from TheseusNavigator/bundled-addons/hermes/
runs as a web page here with no changes to the UI code — all the host
API it needs (bridge.invoke, bridge.on, storage) is provided by the
shim.js next to it. The two pieces together give visitors without
Theseus a working browser messenger: paste an nsec or 12/24-word
mnemonic, resolve a .x name on-chain, send a NIP-17 gift-wrapped DM
over a WebSocket to the recipient's declared relays.
What landed:
- index.html — copy of the panel's panel.html with the site topnav
wrapped above it (so Overview / Branding / home stay reachable) and
the panel's own .bar + .screen in a .panel-root flex container. The
.screen stays position:absolute inset:44px 0 0 0 — just anchored to
the panel root now instead of the viewport. Shared.css provides the
topnav styling; the panel's inline <style> keeps the rest. Three
assets/mark.svg references rewritten to ../assets/mark.svg so the
injected <base href="/bns/hermes.x/messenger/"> resolves them to the
site-root assets/ directory, not messenger/assets/.
- shim.js — ~540 lines implementing window.silentmode.{invoke,on,off,
storage,sidebar}. invoke handlers: init(nsec | mnemonic | create),
status, inbox, send, contactsList, contactsAdd, markThreadRead,
getProfile (stub), signOut, canUseVault (always false in a browser),
phone/backup/updateProfile stubs for the Theseus-only paths. Crypto
is pure nostr-tools from jsdelivr ESM — nip44 v2 for the content key,
wrapChat / unwrapChat mirroring TheseusNavigator/lib/hermes.js exactly.
Keys: nsec1 via nip19, BIP-39 via WebCrypto PBKDF2+HKDF with info
"silentmode/messenger/0" (same path as the Theseus host).
Name resolution hits /api/name/<name> for np + nr; the shim parses np
as hex(64) or npub1, nr as whitespace/comma-separated wss:// URLs,
with wss://nos.lol as the default when the owner publishes no nr.
localStorage falls back to an in-memory Map when it throws — the
navigate.st relay serves BNS sites under a CSP sandbox without
allow-same-origin, which disables localStorage. Signed in state
survives the tab's lifetime; reload re-prompts for the key. Loaded
outside the sandbox (Theseus direct origin), localStorage works and
state persists across sessions.
|
||
|---|---|---|
| assets | ||
| branding | ||
| messenger | ||
| overview | ||
| index.html | ||