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

Support NIP-44 #166

Open
dongshu2013 opened this issue Dec 21, 2023 · 7 comments
Open

Support NIP-44 #166

dongshu2013 opened this issue Dec 21, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@dongshu2013
Copy link

looks like NIP-04 is deprecated in favor of NIP-44. Would love to see that to be supported.

@fiatjaf
Copy link
Contributor

fiatjaf commented Dec 21, 2023

NIP-44 is just an encryption scheme, not a DM standard.

@dongshu2013
Copy link
Author

right but I see we provided some help functions of NDKEvent for nip04 at https://github.com/nostr-dev-kit/ndk/blob/master/ndk/src/events/nip04.ts, would be helpful if we can have similar interfaces built for nip44. The NIP04 doc says now NIP04 is unrecommended in favor of NIP44

@erskingardner erskingardner added the enhancement New feature or request label Apr 9, 2024
@erskingardner
Copy link
Collaborator

Yup – this definitely needs to be added.

@manimejia
Copy link

manimejia commented Jun 2, 2024

right ... I'm gonna get started on this ... along with consideration for an NDKNip49Signer by refactoring the encrypt() and decrypt() entrypoints.

  • I will rename the file ndk/src/events/nip04.ts to encryption.ts, and refactor it's functions encrypt() and decrypt() to accept an optional method param (or something like this) where one can specify 'what kind of encryption should be done.
  • I will also add this optional method param to the encrypt() and decrypt() methods of this interface NDKSigner which implementing classes MAY make use of.
  • I will also be refactoring the NDKNip07Signer class, replacing nip04 with encryption in a number of method names.

just saying ... encryption is the new term replacing nip04, when it comes to "what signers do when they 'encrypt' or decrypt notes and other stuff"

@manimejia
Copy link

Here's the solution I've come up with to implement Nip44 in NDKSigners. Please test this PR.
#233

@manimejia
Copy link

I'm working on a PR to add NIP44 encryption and NIP59 gift wrap functionality to NDKEvents and NDKSigners. Will be pushing this weekend. Hoping to run this in my production client ASAP. Reviews and testing is welcome.

#233

@erskingardner
Copy link
Collaborator

@manimejia Leaving comments on the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants