upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <alex@cloudware.io>2022-12-17 21:43:17 +0100
committerfiatjaf <fiatjaf@gmail.com>2022-12-18 06:29:29 -0300
commitc840d75ce023f64918f57a519417e39f57f0f53b (patch)
tree64b72281273a61e367a524f8be4336b289f9da9a
parentda6a7d0ee3dd492c87132caa7e4b005cd58b73b1 (diff)
nip-07: add the missing functions
as per conversation in t.me/nostr_protcol getRelays, nip04.encrypt and nip04.decrypt - these are already implemented by nos2x and getalby.
-rw-r--r--07.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/07.md b/07.md
index 27bd575..644b23c 100644
--- a/07.md
+++ b/07.md
@@ -13,6 +13,9 @@ That object must define the following methods:
13``` 13```
14async window.nostr.getPublicKey(): string // returns a public key as hex 14async window.nostr.getPublicKey(): string // returns a public key as hex
15async window.nostr.signEvent(event: Event): Event // takes an event object and returns it with the `sig` 15async window.nostr.signEvent(event: Event): Event // takes an event object and returns it with the `sig`
16async window.nostr.getRelays(): { [url: string]: {read: boolean, write: boolean} } // returns a map of relay urls to relay policies
17async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertext+iv as specified in nip-04
18async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext+iv as specified in nip-04
16``` 19```
17 20
18### Implementation 21### Implementation