upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2022-05-06 20:54:45 -0300
committerfiatjaf <fiatjaf@gmail.com>2022-05-06 20:54:45 -0300
commit37eb53e3d93367e76c332c25a0c652922588ceb8 (patch)
treef13c0707bbeeb447480757a608f2a22d28fb4f34
parent8ab240e8895928bb1199a74cf367463529cdf35b (diff)
publish NIP-07: window.nostr.
-rw-r--r--07.md20
-rw-r--r--README.md1
2 files changed, 21 insertions, 0 deletions
diff --git a/07.md b/07.md
new file mode 100644
index 0000000..4c7a683
--- /dev/null
+++ b/07.md
@@ -0,0 +1,20 @@
1NIP-07
2======
3
4`window.nostr` capability for web browsers
5------------------------------------------
6
7`draft` `optional` `author:fiatjaf`
8
9The `window.nostr` object may be made available by web browsers or extensions and websites or web-apps may make use of it after checking its availability.
10
11That object must define the following methods:
12
13```
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`
16```
17
18### Implementation example
19
20- [nos2x](https://github.com/fiatjaf/nos2x) is available as a Chromium (and partially Firefox) extension that provides such capabilities.
diff --git a/README.md b/README.md
index 7ac60b7..d8c00fb 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh
8- [NIP-04: Encrypted Direct Message](04.md) 8- [NIP-04: Encrypted Direct Message](04.md)
9- [NIP-05: Mapping Nostr keys to DNS-based internet identifiers](05.md) 9- [NIP-05: Mapping Nostr keys to DNS-based internet identifiers](05.md)
10- [NIP-06: Basic key derivation from mnemonic seed phrase](06.md) 10- [NIP-06: Basic key derivation from mnemonic seed phrase](06.md)
11- [NIP-07: `window.nostr` capability for web browsers](07.md)
11- [NIP-08: Handling Mentions](08.md) 12- [NIP-08: Handling Mentions](08.md)
12- [NIP-09: Event Deletion](09.md) 13- [NIP-09: Event Deletion](09.md)
13- [NIP-10: Conventions for clients' use of `e` and `p` tags in text events.](10.md) 14- [NIP-10: Conventions for clients' use of `e` and `p` tags in text events.](10.md)