From d33643e0683dfac4037c0b61d4aa823782f582e7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 2 Aug 2026 17:51:37 -0700 Subject: Recipient search: usernames and npubs, in chat and the Send form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A shared engine (src/recipient-search.js) merges three ranked sources: an exact npub/hex paste, coinos usernames from the registrar's new /search prefix endpoint, and NIP-50 kind-0 full-text search on relay.nostr.band — the approach the major web clients take, since ordinary relays don't index profiles. Results dedupe by pubkey, fill avatars in one batched kind-0 fetch, and cache per query so narrowing never re-hits the network. Input is debounced 300ms and gated by a searchable() heuristic so addresses, invoices, and keys never trigger a search. Chat's New message panel narrows as you type and opens the thread on pick; the Send form shows the same candidates under the destination input and picking one runs the normal paste path (payment address → BIP-353, npub → zap). Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- src/i18n.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/i18n.js') diff --git a/src/i18n.js b/src/i18n.js index d8e5ce0..8ca63cc 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -168,6 +168,9 @@ const STR = { msgYouPrefix: 'You:', msgOpen: 'Open', msgNpubPlaceholder: 'npub…', + msgSearchPlaceholder: 'Name or npub…', + msgSearching: 'Searching…', + msgNoMatches: 'No matches', msgBadNpub: 'Not a valid npub', msgSignerNoDm: 'This signer cannot encrypt DMs — log in again', msgJoin: 'Join', -- cgit v1.2.3