iris-messenger icon indicating copy to clipboard operation
iris-messenger copied to clipboard

key: use nip19 identifiers everywhere

Open npub1zenn0 opened this issue 2 years ago • 8 comments

Changes links to point to nprofile/nevent rather than npub/note.

Changes to src/js/lib/nostr-tools/nip19.ts are copy paste from nostr-tools library.

npub1zenn0 avatar Apr 30 '23 17:04 npub1zenn0

I'm a bit hesitant to add nevent / nprofile creation because they're so much longer than note / npub, and many of the hinted relays might not even exist in 1 year. Relay urls are dependent on the centralized DNS or IP addresses. Npub / note content addresses are decentralized, elegant and timeless.

mmalmi avatar May 01 '23 19:05 mmalmi

I strongly agree, npub+event id should be the canonical way to refer to an event for many reasons.

Even if a relay exists, 80% of the relays are very slow and are much better used as backups.

On Mon, May 1, 2023, 13:36 Martti Malmi @.***> wrote:

I'm a bit opposed to nevent / nprofile because they're much longer (ugly iris.to/ urls) and many of the hinted relays might not even exist in 1 year. Relay urls are dependent on the centralized DNS or IP addresses. Content addresses are decentralized, elegant and timeless.

— Reply to this email directly, view it on GitHub https://github.com/irislib/iris-messenger/pull/383#issuecomment-1530116617, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN5SWAFIAUDDV7FOR6V552TXEAGDDANCNFSM6AAAAAAXRBYRNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

adamritter avatar May 01 '23 19:05 adamritter

nprofiles still contain the public key so they're no less decentralized nor less relevant in the future, in that sense. It's true they're longer.

The changes in this pr use the nprofile/nevent relays as extras, not the sole only ones.

I believe the goal of nprofile/nevent is to reduce dependence on the few huge relays that currently run the show.

I don't see any consensus between the clients on how they do this. I like nevent, makes me think the note will always be found, nprofile seems a little redundant but I prefer the phrase nprofile over npub because it has the word profile :sweat_smile:

I leave it to you to decide.

npub1zenn0 avatar May 02 '23 03:05 npub1zenn0

Ah, cool, actually it's great that nevent can contain public key. It's definately an improvement over note+note_id.

On Mon, May 1, 2023 at 10:33 PM npub1zenn0 @.***> wrote:

nprofiles still contain the public key so they're no less decentralized nor less relevant in the future, in that sense. It's true they're longer.

The changes in this pr use the nprofile/nevent relays as extras, not the sole only ones.

I believe the goal of nprofile/nevent is to reduce dependence on the few huge relays that currently run the show.

I don't see any consensus between the clients on how they do this. I like nevent, makes me think the note will always be found, nprofile seems a little redundant but I prefer the phrase nprofile over npub because it has the word profile 😅

I leave it to you to decide.

— Reply to this email directly, view it on GitHub https://github.com/irislib/iris-messenger/pull/383#issuecomment-1530821571, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN5SWAAMIYKL2WH4QFQLTN3XEB6B7ANCNFSM6AAAAAAXRBYRNI . You are receiving this because you commented.Message ID: @.***>

adamritter avatar May 02 '23 04:05 adamritter

nprofile contains public key + relays, nevent contains event id + relays

npub1zenn0 avatar May 02 '23 04:05 npub1zenn0

oh but actually nevent can have author too yeah, I didn't even notice that til now.

npub1zenn0 avatar May 02 '23 04:05 npub1zenn0

@mmalmi do you have a timeline on the new iris frontend? I'd like for iris to support nprofiles at least in the search bar. I could remove the other nprofile stuff from this pr if need be? But if the new frontend is almost there, then I'm not gonna bother.

With #382 , it's an almost surefire way of finding whichever profile/event you paste in.

Also the CI is failing on lint errors which are also on main.

npub1zenn0 avatar May 11 '23 03:05 npub1zenn0

@mmalmi do you have a timeline on the new iris frontend? I'd like for iris to support nprofiles at least in the search bar. I could remove the other nprofile stuff from this pr if need be? But if the new frontend is almost there, then I'm not gonna bother.

With #382 , it's an almost surefire way of finding whichever profile/event you paste in.

Also the CI is failing on lint errors which are also on main.

I hope I can merge the new UI before the end of next week.

mmalmi avatar May 11 '23 15:05 mmalmi