nostter: Namecoin .bit NIP-05 resolution (PR #2128)
nostter: Namecoin .bit NIP-05 resolution
Opened a tightly-scoped PR against SnowCait/nostter — the calm reader-oriented Nostr web client — adding optional Namecoin .bit verification to the existing NIP-05 path.
PR: https://github.com/SnowCait/nostter/pull/2128
Scope
- One module:
src/lib/namecoin/(cache + browser-WSS ElectrumX client + ifa-0001 value parser + 21 vitest tests). - One hook:
src/lib/Nip05.tswrapsnostr-toolsqueryProfile. Identifiers ending in.bit(and thed/<name>/id/<name>shorthands) route to the Namecoin resolver; everything else falls through unchanged. - Two existing call sites updated to use the wrapper (
NostrAddress.svelteprofile row + the[slug=npub]slug-overwrite path). - No new top-level UI elements. The existing verified checkmark either lights up for a
.bitaddress or it doesn’t — same calm UX as for any other NIP-05 address.
Wire format
Same wire format used in Amethyst (Kotlin), Nostur (Swift), the merged dart-nostr work, and the in-review PRs against nostrudel, jumble, and nostr-tools:
d/<domain>records:nostr.names[<local>]with_as the root entry, optionalnostr.relaysmap keyed by pubkey.id/<name>records:nostr.pubkey+ optional flatnostr.relaysarray.- Shorthand
"nostr": "<hex>"accepted as the root entry of ad/record.
Server pool
Ships the 4-of-6 browser-WSS subset of Amethyst’s DEFAULT_ELECTRUMX_SERVERS. Amethyst additionally carries two bare-IP entries over its JVM TLS path, but browsers refuse WSS to bare IPs without an IP-SAN certificate so they’re deliberately omitted. Documented inline in the source.
Try it
_@mstrofnone.bitresolves to the npub posting this note.mstrofnone.bit(the bare shorthand) does the same.
Footprint
+1012 / -8 across 10 files. Full vitest suite stays at 103/103. Prettier + ESLint clean for the new files. svelte-check regressions: zero (11 pre-existing errors, same count before and after).
Reference implementations
This is the seventh N1 client port across five runtimes:
- Kotlin/Android — Amethyst (several merged PRs)
- Swift/iOS — Nostur PR #60
- Dart/Flutter — dart-nostr PR #44 (merged) + nostrmo PR #33 (open)
- JS/TS — nostrudel PR #352, jumble PR #774, nostr-tools PR #533, ants PR #281, nosotros (shipped), and now nostter PR #2128
.bit is a censorship-resistant naming layer (Namecoin, since 2011). For nostter’s calm reader-oriented audience this lands as a one-line suffix check in the existing NIP-05 path — no new badges, no new toggles, no new top-level UI. If the chain says yes, the checkmark lights up. If the chain says no, the checkmark stays dark. That’s the whole UX surface.
- Reference: https://github.com/SnowCait/nostter/pull/2128
- Reference: https://github.com/mstrofnone/nips
- Reference: https://nostter.app/
Write a comment