Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search via Plebnames, lookup npub in Bitcoin OP_RETURN #586 #589

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MichiSpebach
Copy link

@MichiSpebach MichiSpebach commented Sep 17, 2024

implementation of #586

This is a draft and will need some improvements and everything is up for discussion.
The implementation is now that if you search and the input ends with ".btc" a cors call to bitcoin explorers are made (https://mempool.space/api, https://blockchain.info, https://blockstream.info/ or https://btcscan.org/). If the plebname is claimed and has a nostr npub attached it is added to the result list.

Example: If you search for "test.btc" the nostr OP_RETURN script of the owner is looked up and resolved:
image

Just as an idea I also added subHeaders to the search results to display the npub or nip05 to see unique identifiers:
image

Some improvements I can do:
To not ship the plebnames library on startup we could use a dynamic import that loads not until a search is requested.
We can use npm instead of jsr to not having to add jsr.
What do you think, dynamic import or npm?

I also can add the plebname lookup result to the FuzzySearch cache. What do you think about this?

…rching, show nip05 or npub in search results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant