nostr-protocol / nips

Nostr Implementation Possibilities
2.39k stars 582 forks source link

Add Pubky Integration #1548

Open melvincarvalho opened 3 weeks ago

melvincarvalho commented 3 weeks ago

Propose an integration with the Pubky protocol, which has just launched.

There are many ways to do it, but the simplest that will work is to integrate with NIP-24

 "pubky":  "96617cf250515332a051cb751b61ca2a320b1787216ba52a54379f488ae10ba2"

Clients already use and respect this. One line just needs to be added to the NIP text for a full integration.

Implementors can go ahead and implement this today. As deployments grow, the NIPs can reflect what is in use.

About pubky - Links taken from their official room

Some Pubky links to get started!

Blog post overview:

vitorpamplona commented 3 weeks ago

What would the extra metadata field do?

It feels like if we had to use something like pubky, it would be to avoid using relay URLs with domain names and just connect to the relay's own key instead. So, I don't know what the extra NIP-24 field would be doing.

melvincarvalho commented 3 weeks ago

I have implemented pubky in noskey which will allow you to generate a pubky from your nostr privkey

noskey -p <privkey>

Should work.

Note: the pubky value is without any URI prefix as that is implied from the json key.

It should not be possible to start putting pubky values into nostr profiles and beginning to use pubkey apps

image

melvincarvalho commented 2 weeks ago

Showing what the UX could look like, mastodon have had this feature for a long time.

It should be farily easy to copy.

image

melvincarvalho commented 2 weeks ago

It has also been integrated into nslookup. The Ben is running a no-tracking DNS server.

This is a big deal because it allows every npub to have a censorship-resistant domain, no more takedowns, no gatekeepers, and your data is stored across a resilient, battle-tested, massive network of nodes.

$ nslookup -type=txt  _npub.8xssyidksmiup9og9k47s41hy7zt71r74fm6zhoc3cuxj9qr7ray 66.78.40.76

Server:     66.78.40.76
Address:    66.78.40.76#53

Non-authoritative answer:
_npub.8xssyidksmiup9og9k47s41hy7zt71r74fm6zhoc3cuxj9qr7ray  
text = "npub17zh5navmw7zrdmdfgm8khmeef0zrgyn4kjx4g2x6j0fkcyg7m8wqe3zmwj"
melvincarvalho commented 1 day ago

This would be solved with: https://github.com/nostr-protocol/nips/pull/1593

mikedilger commented 1 day ago

Just add it to metadata. People added dozens of fields to metadata before with no community synchronization or discussion. Metadata doesn't have a strictly defined set of keys. You can have it listed on NIP-24 if you want.