1.3 KiB
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 ofnip-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