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-57 Old zaps can't be authorized by clients if nostrPubkey is changed #288

Open
spcxta opened this issue Feb 23, 2023 · 5 comments
Open

Comments

@spcxta
Copy link

spcxta commented Feb 23, 2023

Given:

  • Receiver of zap is R
  • R or the LNURL provider of R can choose an authorized Zapper Z
  • Pubkey of Z is published as field nostrPubkey at the LNURL-pay endpoint
  • Clients only display/tally zap notes published by the current Zapper of R

So if nostrPubkey for R is changed for any reason (switching “provider”, zapper key rotation, …), old zaps can’t be authorized and won’t be displayed in clients anymore?

@spcxta spcxta changed the title NIP 57 - Old zaps can't be authorized by clients if nostrPubkey is changed NIP-57 Old zaps can't be authorized by clients if nostrPubkey is changed Feb 23, 2023
@fiatjaf
Copy link
Member

fiatjaf commented Feb 23, 2023

Yes.

@spcxta
Copy link
Author

spcxta commented Feb 23, 2023

This could be solved by putting the authorized nostrPubkey (signed by R) inside the zap note or zap request

@spcxta
Copy link
Author

spcxta commented Feb 23, 2023

image

@fiatjaf
Copy link
Member

fiatjaf commented Feb 23, 2023

This could be solved by putting the authorized nostrPubkey (signed by R) inside the zap note or zap request

As I suggested in #224, it would be better for each user to have the option to put multiple zap provider URLs along with their pubkeys inside their metadata event.

@shafemtol
Copy link
Contributor

My 2 sats on this issue:

in order to retain previously received zaps, maybe one could define a new event type for explicitly authorizing old zaps via e tags and/or old nostrPubkeys via p tags, in the 10000-19999 (replaceable) or 30000-39999 (parameterized replaceable) range.

The idea being that for easy migration you just add the nostrPubkey, but if you no longer trust that key, there's the option to authorize old zaps individually.

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

No branches or pull requests

3 participants