Namecoin NIP-05 identity resolution (.bit domains)#205
Open
mstrofnone wants to merge 2 commits intocesardeazevedo:mainfrom
Open
Namecoin NIP-05 identity resolution (.bit domains)#205mstrofnone wants to merge 2 commits intocesardeazevedo:mainfrom
mstrofnone wants to merge 2 commits intocesardeazevedo:mainfrom
Conversation
added 2 commits
April 17, 2026 02:46
Enable .bit domain identities without centralised HTTP servers by resolving Namecoin names directly from the browser via ElectrumX WebSocket — no backend proxy or server-side code needed. Browser-side (src/services/namecoin/): - electrumx-ws.ts — WebSocket JSON-RPC client for ElectrumX - resolver.ts — identifier parsing, LRU cache, Nostr data extraction - constants.ts — ElectrumX server list, protocol constants - types.ts — TypeScript interfaces Modified: - useNIP05.ts — intercepts .bit/d//id/ identifiers, resolves via blockchain instead of HTTP well-known - UserNIP05.tsx — distinct teal shield icon for Namecoin-verified identities (IconShieldCheck) - useSearchSuggestions.ts — detects .bit/d//id/ in search bar, resolves via ElectrumX and shows result - SearchContent.tsx — renders Namecoin search results with shield icon Supported identifier formats: - alice@example.bit → d/example, localPart=alice - _@example.bit / example.bit → d/example, root - d/example → direct domain lookup - id/alice → identity namespace Reads Nostr pubkeys and relays from Namecoin name values following the same JSON structure used by Amethyst and other Nostr clients. Based on the approach from hzrd149/nostrudel#352
When navigating to /search?q=testls.bit (or any .bit/d//id/ identifier), the search results page now resolves the Namecoin name via ElectrumX and redirects to the user's profile page instead of showing empty NIP-50 relay search results. Also fixes: - SearchDialog: clicking a Namecoin suggestion now navigates to the user profile (was falling through the switch with no handler) - Relay hints from Namecoin resolution are now passed through the suggestion type and used in nprofile encoding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add decentralised NIP-05 identity verification via Namecoin blockchain,
enabling
.bitdomain identities without centralised HTTP servers.Browser-side (no backend needed):
src/services/namecoin/— ElectrumX WebSocket client, resolver with LRU cache,identifier parsing, Nostr data extraction
useNIP05hook to intercept.bit/d//id/identifiers and route toblockchain resolver instead of HTTP well-known
UserNIP05to show distinct teal shield icon (IconShieldCheck) forNamecoin-verified identities
.bit/d//id/input and resolves via ElectrumX,showing the resolved user in suggestions
Supported identifier formats:
alice@example.bit→ d/example, localPart=alice_@example.bit/example.bit→ d/example, rootd/example→ direct domain lookupid/alice→ identity namespaceReads Nostr pubkeys and relays from Namecoin name values following
the same JSON structure used by Amethyst and other Nostr clients.
The browser connects directly to ElectrumX servers via WebSocket
(
ws:///wss://) and performs the full scripthash-based namelookup natively — no proxy, no backend, fully static.
Based on the approach from hzrd149/nostrudel#352