upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--07.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/07.md b/07.md
index 3b7a1d2..0fe8121 100644
--- a/07.md
+++ b/07.md
@@ -22,6 +22,11 @@ async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertex
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
23``` 23```
24 24
25### User experience recommendation
26Due to the way browsers load the extensions, it may take some time for `window.nostr` object will be fully ready to accept requests. Hence, it is a good idea to run the first `window.nostr` interaction on a user action on the web page (like a button click), and not during the page load.
27
28Calling the `window.nostr` based methods during the page load runs the risk of intermittent issues due to race conditions between the client page's script and the extension's script
29
25### Implementation 30### Implementation
26 31
27- [horse](https://github.com/fiatjaf/horse) (Chrome and derivatives) 32- [horse](https://github.com/fiatjaf/horse) (Chrome and derivatives)