From c66cd9b405b6f4751eaab675536da2b4427be650 Mon Sep 17 00:00:00 2001 From: Beemo <120607606+b35363@users.noreply.github.com> Date: Thu, 16 Mar 2023 09:20:14 +0000 Subject: [PATCH] Updated NIP-79 standard --- 79.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 79.md diff --git a/79.md b/79.md new file mode 100644 index 00000000..6fdb1152 --- /dev/null +++ b/79.md @@ -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