diff options
| author | Paul Miller <paul@paulmillr.com> | 2023-12-20 13:22:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-20 09:22:02 -0300 |
| commit | 822b70a565678222706dd6284eb7abcaadfc5115 (patch) | |
| tree | 4cd71d068dfcebc39d418fed61d9c38d0baf752c /07.md | |
| parent | 09f8244e6fb5271a65a51cbbfe2b9503ee8783f3 (diff) | |
NIP44 encryption standard, revision 3 (#746)
* Introduce NIP-44 encryption standard
* Finalize NIP-44
* Update spec.
---------
Co-authored-by: Jonathan Staab <shtaab@gmail.com>
Diffstat (limited to '07.md')
| -rw-r--r-- | 07.md | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -18,8 +18,10 @@ async window.nostr.signEvent(event: { created_at: number, kind: number, tags: st | |||
| 18 | Aside from these two basic above, the following functions can also be implemented optionally: | 18 | Aside from these two basic above, the following functions can also be implemented optionally: |
| 19 | ``` | 19 | ``` |
| 20 | async window.nostr.getRelays(): { [url: string]: {read: boolean, write: boolean} } // returns a basic map of relay urls to relay policies | 20 | async window.nostr.getRelays(): { [url: string]: {read: boolean, write: boolean} } // returns a basic map of relay urls to relay policies |
| 21 | async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertext and iv as specified in nip-04 | 21 | async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertext and iv as specified in nip-04 (deprecated) |
| 22 | async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04 | 22 | async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04 (deprecated) |
| 23 | async window.nostr.nip44.encrypt(sender_privkey, recipient_pubkey, plaintext, version): string // returns encrypted payload as specified in nip-44 | ||
| 24 | async window.nostr.nip44.decrypt(recipient_privkey, sender_pubkey, payload): string // takes encrypted payload as specified in nip-44 | ||
| 23 | ``` | 25 | ``` |
| 24 | 26 | ||
| 25 | ### Implementation | 27 | ### Implementation |