mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-28 03:05:52 -05:00
Updated NIP-79 standard
This commit is contained in:
parent
4bb393735e
commit
c66cd9b405
29
79.md
Normal file
29
79.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
NIP-79
|
||||
======
|
||||
|
||||
`window.nostr` offline message signature & verificiation
|
||||
--------------------------------------------------------
|
||||
|
||||
`draft` `optional` `author:b35363`
|
||||
|
||||
### Idea 💡
|
||||
|
||||
The ability to sign and verify messages must be available clientside in order to have a proper implementation in the case where Users and Remote needs to be mutually verified.
|
||||
|
||||
The authentication between clients and relays can already be implemented with `nip-42` but this standard may lead to a **much simpler authentication** process where no Event has to be submitted on the network to verify authenticity.
|
||||
|
||||
### Nostr Implementation Possibility
|
||||
|
||||
|
||||
> `nip-79` can be used standalone but it is intended to be a superset of `nip-07` it is therefore not recommended to use it without proper NIP-07 implementation.
|
||||
|
||||
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.
|
||||
|
||||
In order to sign and verify messages directly from the browser, the `window.nostr` object must define the following methods:
|
||||
|
||||
```
|
||||
async window.nostr.signMessage(msg : string): string // returns sig string from nip-07 extension
|
||||
async window.nostr.verifyMessage(sig: string, pubkey : string): boolean // takes a sig and a pubkey and verify message integrity
|
||||
```
|
||||
|
||||
## Implementations
|
Loading…
Reference in New Issue
Block a user