Merge pull request #1 from b35363/nip-79

Updated NIP-79 standard
This commit is contained in:
Beemo 2023-03-16 10:22:02 +01:00 committed by GitHub
commit f7f7822391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

29
79.md Normal file
View 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