mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-13 19:06:24 +00:00
publish NIP-07: window.nostr.
This commit is contained in:
parent
8ab240e889
commit
37eb53e3d9
20
07.md
Normal file
20
07.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
NIP-07
|
||||||
|
======
|
||||||
|
|
||||||
|
`window.nostr` capability for web browsers
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
`draft` `optional` `author:fiatjaf`
|
||||||
|
|
||||||
|
The `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.
|
||||||
|
|
||||||
|
That object must define the following methods:
|
||||||
|
|
||||||
|
```
|
||||||
|
async window.nostr.getPublicKey(): string // returns a public key as hex
|
||||||
|
async window.nostr.signEvent(event: Event): Event // takes an event object and returns it with the `sig`
|
||||||
|
```
|
||||||
|
|
||||||
|
### Implementation example
|
||||||
|
|
||||||
|
- [nos2x](https://github.com/fiatjaf/nos2x) is available as a Chromium (and partially Firefox) extension that provides such capabilities.
|
@ -8,6 +8,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh
|
|||||||
- [NIP-04: Encrypted Direct Message](04.md)
|
- [NIP-04: Encrypted Direct Message](04.md)
|
||||||
- [NIP-05: Mapping Nostr keys to DNS-based internet identifiers](05.md)
|
- [NIP-05: Mapping Nostr keys to DNS-based internet identifiers](05.md)
|
||||||
- [NIP-06: Basic key derivation from mnemonic seed phrase](06.md)
|
- [NIP-06: Basic key derivation from mnemonic seed phrase](06.md)
|
||||||
|
- [NIP-07: `window.nostr` capability for web browsers](07.md)
|
||||||
- [NIP-08: Handling Mentions](08.md)
|
- [NIP-08: Handling Mentions](08.md)
|
||||||
- [NIP-09: Event Deletion](09.md)
|
- [NIP-09: Event Deletion](09.md)
|
||||||
- [NIP-10: Conventions for clients' use of `e` and `p` tags in text events.](10.md)
|
- [NIP-10: Conventions for clients' use of `e` and `p` tags in text events.](10.md)
|
||||||
|
Loading…
Reference in New Issue
Block a user