aboutsummaryrefslogtreecommitdiffstats
path: root/tools/marmot-chat-test.js
Commit message (Collapse)AuthorAgeFilesLines
* Call the protocol by its name: 'Marmot (MLS)' in the group-type picker and ↵Adam Soltys7 days1-2/+2
| | | | | | the send-by menu (White Noise is one app that speaks it); a zap on something no relay has says it may be a private message instead of claiming the post vanished Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Browser tests: public relays answered in the page, never reachedAdam Soltys8 days1-1/+1
| | | | | | | | | | | | | | A suite run let ~90 throwaway test wallets subscribe and publish on public relays from one home address, and nos.lol and relay.damus.io banned it. tools/puppeteer.js wraps puppeteer-core: every socket to a non-local host gets an in-page stand-in relay (EVENT -> OK, REQ -> EOSE). Tests that read real content launch with { relays: 'read' } (real reads, publishes answered in place); feed-live, chat-layout and cordn-ui launch with { relays: 'live' }. LIVE_RELAYS=read|1|host,... overrides per run. profile-key-qr: measure the QR again if a repaint swapped it out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* White Noise attachments (encrypted-media-v2)Adam Soltys12 days1-0/+28
| | | | | | | | | | | | | | | | | | | Pictures and files now travel in White Noise groups and direct chats, both ways. A file is sealed under the group's media secret for the epoch its message goes out in (MLS exporter "encrypted-media" -> HKDF -> ChaCha20-Poly1305, AAD bound to hash, type and name), uploaded to Blossom, and sent as a kind 9 with a v2 imeta tag. A commit landing mid-upload moves the epoch, so the file is sealed again rather than sent under a stale key. Receivers keep each epoch's media secret for as long as a message from it is in the log, so older pictures still open. Groups founded here now carry and require marmot.group.encrypted-media.v2 (blossom-v1 on blossom.ditto.pub and nostr.download). Checked against MDK's wn: our pictures decrypt in wn, wn's in ours, and wn uploads into our groups by our policy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* DM threads: choose by hand whether a message goes by White Noise or Nostr DMAdam Soltys12 days1-0/+22
| | | | | | | | | | Where a person can be reached both ways (a direct White Noise group with them, or a KeyPackage from another app), the thread header now carries a small pill naming the way the next message will travel. Tapping it pins White Noise or Nostr DM for that thread, or puts it back on Automatic (reply the way they last wrote). Threads with only one road show nothing. Co-Authored-By: Claude Fable 5.1 <[email protected]>
* White Noise can find a coinos account: relay lists go to its directory relaysAdam Soltys12 days1-0/+10
| | | | | | | | | | | The Android app said a coinos user "isn't on White Noise yet" although their KeyPackage was published: MDK will not invite an account whose kind 10002 and 10050 lists it cannot find, and it looks on relay.eu/us.whitenoise.chat and purplepag.es, where coinos never wrote. The client now passes the account's already-signed lists along to those relays (no signer needed, nothing rewritten), weekly and until both exist. Co-Authored-By: Claude Fable 5.1 <[email protected]>
* README: where the White Noise code lives; the live UI test waits out a relay ↵Adam Soltys12 days1-1/+2
| | | | | | reconnect Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Group chats notice a relay that dropped their subscriptionAdam Soltys12 days1-1/+24
| | | | | | | | | A group that misses a commit is stuck until it hears it, and a group founded by White Noise can live on a single relay. Its subscriptions now report a close to the chat watchdog, and one made while a relay was being skipped as dead is rebuilt when that relay comes back. Co-Authored-By: Claude Fable 5.1 <[email protected]>
* Group chats live on relays White Noise will dialAdam Soltys12 days1-7/+14
| | | | | | | | MDK refuses relay.damus.io and relay.nostr.band outright (its retired hosts), so a group founded here must not name them: relay.primal.net takes damus's place. The UI test can also run against a deployed site. Co-Authored-By: Claude Fable 5.1 <[email protected]>
* White Noise (Marmot) chats: MLS group messaging in native JSAdam Soltys12 days1-0/+205
The Chat tab now speaks the protocol the White Noise app speaks, beside Concord communities and NIP-17 DMs, without anyone having to pick one: - A two-person group with no name is a direct message. It lands in the same thread as that person's NIP-17 messages, and a reply goes back the way their last message came. A first message goes by White Noise only to someone whose KeyPackage another app published (a coinos wallet reads NIP-17 on all its devices; an MLS group reaches one). - Groups get rows of their own in the Messages list, a New group button, an invitation card, members, add/remove/rename for admins, leave. - Every wallet publishes a KeyPackage (kind 30443), so it can be invited. src/mls.js is RFC 9420 for ciphersuite 0x0001 on the noble libs (no WebAssembly), with the extensions-draft pieces Marmot needs (app_data_dictionary, app_data_update, app_ephemeral, self_remove). src/marmot.js is the Marmot layer: components, the account identity proof, the 30443/444/445 event shapes and the group engine (publish-before-apply, retained epochs, same-epoch tie-break). State is per device, in IndexedDB (src/marmot-store.js). The whole stack is one lazy chunk (72 KB). Tested against the RFC 9420 vectors (tools/mls-vectors-test.js) and against the Rust reference, MDK's wn CLI, at the protocol level (tools/marmot-interop-test.js) and through the real UI (tools/marmot-chat-test.js). Not yet: attachments in these chats, push for group messages, the app-message witness boost in fork selection. Co-Authored-By: Claude Fable 5.1 <[email protected]>