Support NIP-44
looks like NIP-04 is deprecated in favor of NIP-44. Would love to see that to be supported.
NIP-44 is just an encryption scheme, not a DM standard.
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
Yup – this definitely needs to be added.
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 functionsencrypt()anddecrypt()to accept an optionalmethodparam (or something like this) where one can specify 'what kind ofencryptionshould be done. - I will also add this optional
methodparam to theencrypt()anddecrypt()methods of this interface NDKSigner which implementing classes MAY make use of. - I will also be refactoring the NDKNip07Signer class, replacing
nip04withencryptionin 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"
Here's the solution I've come up with to implement Nip44 in NDKSigners. Please test this PR. https://github.com/nostr-dev-kit/ndk/pull/233
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.
https://github.com/nostr-dev-kit/ndk/pull/233
@manimejia Leaving comments on the PR.