Compare commits

...

7 Commits

Author SHA1 Message Date
Rob Woodgate eaef52c7a9
Merge 9e6524c98b into 7dec812f99 2025-08-12 13:16:20 +01:00
Awiteb 7dec812f99
nip22: fix example type for external URL (#2011) 2025-08-11 17:26:05 -04:00
Yoji Shidara 739f3c5263
NIP-24: Fix heading levels (#2009) 2025-08-11 19:37:53 +09:00
Yoji Shidara 8830525250
NIP-21: Fix markup issue by closing backtick (#2008) 2025-08-11 19:35:36 +09: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
5 changed files with 14 additions and 13 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.

2
21.md
View File

@ -21,7 +21,7 @@ The identifiers that come after are expected to be the same as those defined in
### Linking HTML pages to Nostr entities ### Linking HTML pages to Nostr entities
`<link>` tags with `rel="alternate"` can be used to associate webpages to Nostr events, in cases where the same content is served via the two mediums (for example, a web server that exposes Markdown articles both as HTML pages and as `kind:30023' events served under itself as a relay or through some other relay). For example: `<link>` tags with `rel="alternate"` can be used to associate webpages to Nostr events, in cases where the same content is served via the two mediums (for example, a web server that exposes Markdown articles both as HTML pages and as `kind:30023` events served under itself as a relay or through some other relay). For example:
``` ```
<head> <head>

8
22.md
View File

@ -143,13 +143,13 @@ A comment on a website's url looks like this:
"tags": [ "tags": [
// referencing the root url // referencing the root url
["I", "https://abc.com/articles/1"], ["I", "https://abc.com/articles/1"],
// the root "kind": for an url, the kind is its domain // the root "kind": for an url
["K", "https://abc.com"], ["K", "web"],
// the parent reference (same as root for top-level comments) // the parent reference (same as root for top-level comments)
["i", "https://abc.com/articles/1"], ["i", "https://abc.com/articles/1"],
// the parent "kind": for an url, the kind is its domain // the parent "kind": for an url
["k", "https://abc.com"] ["k", "web"]
] ]
// other fields // other fields
} }

13
24.md
View File

@ -8,8 +8,7 @@ Extra metadata fields and tags
This NIP keeps track of extra optional fields that can added to events which are not defined anywhere else but have become _de facto_ standards and other minor implementation possibilities that do not deserve their own NIP and do not have a place in other NIPs. This NIP keeps track of extra optional fields that can added to events which are not defined anywhere else but have become _de facto_ standards and other minor implementation possibilities that do not deserve their own NIP and do not have a place in other NIPs.
kind 0 ### kind 0
======
These are extra fields not specified in NIP-01 that may be present in the stringified JSON of metadata events: These are extra fields not specified in NIP-01 that may be present in the stringified JSON of metadata events:
@ -19,24 +18,22 @@ These are extra fields not specified in NIP-01 that may be present in the string
- `bot`: a boolean to clarify that the content is entirely or partially the result of automation, such as with chatbots or newsfeeds. - `bot`: a boolean to clarify that the content is entirely or partially the result of automation, such as with chatbots or newsfeeds.
- `birthday`: an object representing the author's birth date. The format is { "year": number, "month": number, "day": number }. Each field MAY be omitted. - `birthday`: an object representing the author's birth date. The format is { "year": number, "month": number, "day": number }. Each field MAY be omitted.
### Deprecated fields #### Deprecated fields
These are fields that should be ignored or removed when found in the wild: These are fields that should be ignored or removed when found in the wild:
- `displayName`: use `display_name` instead. - `displayName`: use `display_name` instead.
- `username`: use `name` instead. - `username`: use `name` instead.
kind 3 ### kind 3
======
These are extra fields not specified in NIP-02 that may be present in the stringified JSON of follow events: These are extra fields not specified in NIP-02 that may be present in the stringified JSON of follow events:
### Deprecated fields #### Deprecated fields
- `{<relay-url>: {"read": <true|false>, "write": <true|false>}, ...}`: an object of relays used by a user to read/write. [NIP-65](65.md) should be used instead. - `{<relay-url>: {"read": <true|false>, "write": <true|false>}, ...}`: an object of relays used by a user to read/write. [NIP-65](65.md) should be used instead.
tags ### tags
====
These tags may be present in multiple event kinds. Whenever a different meaning is not specified by some more specific NIP, they have the following meanings: These tags may be present in multiple event kinds. Whenever a different meaning is not specified by some more specific NIP, they have the following meanings:

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