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

nip-21: support nip-05 address. #1855

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kehiy
Copy link
Contributor

@kehiy kehiy commented Mar 23, 2025

No description provided.

@kehiy
Copy link
Contributor Author

kehiy commented Mar 23, 2025

cc @mikedilger

@mikedilger
Copy link
Contributor

All the existing 'nostr:' addresses use bech32 encoded data. So we would have to update NIP 19 with a new encoding and then use that.

@alexgleason
Copy link
Member

A better solution would be to do what Bluesky is doing with rich text facets. Then we would just put @kehiy.net directly in the content as plaintext, and "hydrate" it when displayed with structured json data in one of the tags.

@vitorpamplona
Copy link
Collaborator

Who is referring to people by their nip05? I get usernames, but nip05? No one remembers people's full email address.

@kehiy
Copy link
Contributor Author

kehiy commented Mar 24, 2025

@mikedilger i think you missed the first change, i've added another case that says it can be a nip-05 address as well. so no need to change the nip-19.

@kehiy
Copy link
Contributor Author

kehiy commented Mar 24, 2025

@alexgleason doing this, is also a good idea. but this nip is not only aimed to be used on nostr clients. i want to share nostr: uri outside of nostr. for example on a a tag on my website.

look at: https://jellyfish.land on the header.

for example this: lightning:[email protected]

will open alby to make a payment.

but beside it we can nostr. nostr:npub1hu47u55pzjw8cdg0t5f2uvh4znrcvnl3pqz3st6p0pfcctzzzqrsplc46u.

an extension or app can handle it properly. but we have 2 issues:

  1. each time i share it i have to go and find my pubkey.
  2. the handler app can't find where to query this. (nprofile is static, i can't update everywhere i put my nprofile, but i can change my nip-5 data)

so, then i can replace it like: nostr:dezh.tech.

@kehiy
Copy link
Contributor Author

kehiy commented Mar 24, 2025

@vitorpamplona me and a lot of other people. when a new nostr user i invited asks me where is your profile i say kehiy.net, and done. who expects me to share the npub1osweiofherwofgeig?

im talking with someone in a public place in the real world, and i can't say to him let me open my phone, then go to my client and then copy my npub for you! impossible.

also, you don't have to memorize my nip-05 handle. but you have to memorize yours at least!

for the second part, i don't know what are usernames on nostr?

@vitorpamplona
Copy link
Collaborator

@vitorpamplona me and a lot of other people. when a new nostr user i invited asks me where is your profile i say kehiy.net, and done. who expects me to share the npub1osweiofherwofgeig?

Agree. No one memorizes npub1... Apps convert to npub1... automatically. Why would we convert to nip05 and npub1 if npub1 already works? There is no need for a duplicate standard.

im talking with someone in a public place in the real world, and i can't say to him let me open my phone, then go to my client and then copy my npub for you! impossible.

Writing nip05 in the text still requires the app to find the user to write the p-tag. If what you want is just to type @ and write the nip05 to search for the user then no change is needed on this nip. The app can still find the user and write npub1 ..

Search by nip05 is already widely supported in most apps. There is no need to change this nip for that.

also, you don't have to memorize my nip-05 handle. but you have to memorize yours at least!

This doesn't make any sense. You don't write your own nip05 on nostr texts.

for the second part, i don't know what are usernames on nostr?

Just other metadata fields like nip05. We also don't write them on nostr: uris.

@arthurfranca
Copy link
Contributor

me and a lot of other people. when a new nostr user i invited asks me where is your profile i say kehiy.net, and done. who expects me to share the npub1osweiofherwofgeig?

Even better if you shared _.kehiy.net instead of just kehiy.net, this way you could make the _ subdomain redirect to your profile.

We could define a stricter nip05 that disallows . (dot char) on the username part so we can do a nostr link that starts with @ like this:
nostr:@_.kehiy.net or nostr:@me.kehiy.net because everything before the first dot would be the username.

Easy to test for a leading @ before trying bech32 decoding.

@mikedilger
Copy link
Contributor

@mikedilger i think you missed the first change, i've added another case that says it can be a nip-05 address as well. so no need to change the nip-19.

So you have to scan for an '@' first, and if it's not there then look at the prefix up to the '1' digit. More complex, but maybe the right compromise.

A better solution would be to do what Bluesky is doing with rich text facets. Then we would just put @kehiy.net directly in the content as plaintext, and "hydrate" it when displayed with structured json data in one of the tags.

I agree that is better, but it isn't better for nostr events because it isn't easy to migrate to it without introducing a new kind so we know everybody is starting from scratch.

Who is referring to people by their nip05? I get usernames, but nip05? No one remembers people's full email address.

There are people not using nostr who know me as my email address [email protected], which matches my nip-05. I like the idea of telling them "just follow [email protected]" and for nostr clients to find my relays from my nostr.json file. But yes once people are on nostr, I don't think anybody uses nip05 handles for much.

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.

5 participants