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

Add public and private zaps #1040

Merged
merged 2 commits into from
Mar 18, 2024
Merged

Add public and private zaps #1040

merged 2 commits into from
Mar 18, 2024

Conversation

benthecarman
Copy link
Collaborator

This was almost very simple, but sadly doing private zaps with a NIP-07 extension isn't very well supported. The way clients generate the random npub is deterministic from the user's nsec, but since we don't have the user's nsec, we cannot do this. Private zaps will still work, we can just randomly generate the key, the problem is if we see the event in the future, we won't be able to decrypt it ourselves.

@TonyGiorgio
Copy link
Contributor

TonyGiorgio commented Feb 19, 2024

the problem is if we see the event in the future, we won't be able to decrypt it ourselves.

We'll still have some reference for it inside of mutiny, right? And for private zaps, the receiver will still see it was from the sender?

@benthecarman
Copy link
Collaborator Author

benthecarman commented Feb 19, 2024

We'll still have some reference for it inside of mutiny, right?

Not unless we want to persist the key and which event it is associated with

And for private zaps, the receiver will still see it was from the sender?

yes they can tell

the main drawback is if I do a private zap Ben -> Tony, if I open up in Damus I will see you were private zapped but won't be able to tell it was mine. For the receiver it will all be normal though

@TonyGiorgio
Copy link
Contributor

if I do a private zap Ben -> Tony, if I open up in Damus I will see you were private zapped

That's fine IMO, I don't care that much if we're limited here. But will it still show up in Mutiny is more my question.

@benthecarman
Copy link
Collaborator Author

benthecarman commented Feb 19, 2024

That's fine IMO, I don't care that much if we're limited here. But will it still show up in Mutiny is more my question.

yes, because we save the info locally

@TonyGiorgio
Copy link
Contributor

needs rebase

@benthecarman benthecarman force-pushed the pub-priv-zaps branch 2 times, most recently from 2d3df86 to d22650e Compare March 13, 2024 09:29
@benthecarman
Copy link
Collaborator Author

New release of rust-nostr came out so was able to simplify

@TonyGiorgio TonyGiorgio merged commit 1974c3a into master Mar 18, 2024
9 checks passed
@TonyGiorgio TonyGiorgio deleted the pub-priv-zaps branch March 18, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants