Compare commits

...

4 Commits

Author SHA1 Message Date
Rob Woodgate 19e33882e6
Merge 9e6524c98b into b224b0ecb8 2025-08-06 16:52:47 +02:00
Rob Woodgate 9e6524c98b Added constraining rule for signString 2025-03-23 19:24:43 +00:00
Rob Woodgate fdb31772a0 Response has all elements needed to check and verify. New method name to avoid backwards incompatibility in the wild 2025-03-19 22:37:51 +00:00
Rob Woodgate 39bf3cdbea Added optional signSchnorr() method 2025-03-17 18:09:00 +00:00
2 changed files with 4 additions and 0 deletions

3
07.md
View File

@ -21,8 +21,11 @@ async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertex
async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04 (deprecated) async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04 (deprecated)
async window.nostr.nip44.encrypt(pubkey, plaintext): string // returns ciphertext as specified in nip-44 async window.nostr.nip44.encrypt(pubkey, plaintext): string // returns ciphertext as specified in nip-44
async window.nostr.nip44.decrypt(pubkey, ciphertext): string // takes ciphertext as specified in nip-44 async window.nostr.nip44.decrypt(pubkey, ciphertext): string // takes ciphertext as specified in nip-44
async window.nostr.signString(message: string): { hash: string, sig: string, pubkey: string } // return SHA256 `hash` of `message`, Schnorr `sig` of `hash`, `pubkey` of signer
``` ```
To ensure signEvent() permission checks are not bypassed, the optional signString() function MUST NOT sign any message that is a valid stringified event.
### Recommendation to Extension Authors ### Recommendation to Extension Authors
To make sure that the `window.nostr` is available to nostr clients on page load, the authors who create Chromium and Firefox extensions should load their scripts by specifying `"run_at": "document_end"` in the extension's manifest. To make sure that the `window.nostr` is available to nostr clients on page load, the authors who create Chromium and Firefox extensions should load their scripts by specifying `"run_at": "document_end"` in the extension's manifest.

1
46.md
View File

@ -105,6 +105,7 @@ Each of the following are methods that the _client_ sends to the _remote-signer_
| `nip04_decrypt` | `[<third_party_pubkey>, <nip04_ciphertext_to_decrypt>]` | `<plaintext>` | | `nip04_decrypt` | `[<third_party_pubkey>, <nip04_ciphertext_to_decrypt>]` | `<plaintext>` |
| `nip44_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip44_ciphertext>` | | `nip44_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip44_ciphertext>` |
| `nip44_decrypt` | `[<third_party_pubkey>, <nip44_ciphertext_to_decrypt>]` | `<plaintext>` | | `nip44_decrypt` | `[<third_party_pubkey>, <nip44_ciphertext_to_decrypt>]` | `<plaintext>` |
| `sign_string` | `[<message_string_to_sign>]` | `json_stringified({ hash: <sha256_of_message>, sig: <schnorr_of_hash>, pubkey: <pubkey> })` |
### Requested permissions ### Requested permissions