upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/07.md
diff options
context:
space:
mode:
authorPaul Miller <paul@paulmillr.com>2023-12-20 13:22:02 +0100
committerGitHub <noreply@github.com>2023-12-20 09:22:02 -0300
commit822b70a565678222706dd6284eb7abcaadfc5115 (patch)
tree4cd71d068dfcebc39d418fed61d9c38d0baf752c /07.md
parent09f8244e6fb5271a65a51cbbfe2b9503ee8783f3 (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.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/07.md b/07.md
index aa0a5f4..6db0597 100644
--- a/07.md
+++ b/07.md
@@ -18,8 +18,10 @@ async window.nostr.signEvent(event: { created_at: number, kind: number, tags: st
18Aside from these two basic above, the following functions can also be implemented optionally: 18Aside from these two basic above, the following functions can also be implemented optionally:
19``` 19```
20async window.nostr.getRelays(): { [url: string]: {read: boolean, write: boolean} } // returns a basic map of relay urls to relay policies 20async window.nostr.getRelays(): { [url: string]: {read: boolean, write: boolean} } // returns a basic map of relay urls to relay policies
21async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertext and iv as specified in nip-04 21async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertext and iv as specified in nip-04 (deprecated)
22async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04 22async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04 (deprecated)
23async window.nostr.nip44.encrypt(sender_privkey, recipient_pubkey, plaintext, version): string // returns encrypted payload as specified in nip-44
24async 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