Merge 35f5993246c5535422613808b9ffd4b67c82370e into 0619f370bca3485bb9c5870bc2defa03c7c3d10e

This commit is contained in:
Michael Dilger 2025-03-17 09:40:28 -07:00 committed by GitHub
commit 3bbc3d7cef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

14
01.md
View File

@ -174,4 +174,16 @@ This NIP defines no rules for how `NOTICE` messages should be sent or treated.
* `["CLOSED", "sub1", "unsupported: filter contains unknown elements"]`
* `["CLOSED", "sub1", "error: could not connect to the database"]`
* `["CLOSED", "sub1", "error: shutting down idle subscription"]`
- The standardized machine-readable prefixes for `OK` and `CLOSED` are: `duplicate`, `pow`, `blocked`, `rate-limited`, `invalid`, `restricted`, and `error` for when none of that fits.
* `["CLOSED", "sub1", "redacted: some matching events were not served because you are not authorized or authenticated"]`
- The standardized machine-readable prefixes are:
* `blocked` - for OK, when the relay rejects the event for any reason not better described by another prefix
* `deleted` - for OK, when the relay rejects the event because it has been deleted
* `duplicate` - for OK, when the relay already has the event
* `error` - for OK or CLOSED, used for relay errors and also when no other prefix suits
* `invalid` - for OK or CLOSED, when the request is somehow invalid
* `pow` - for OK, when the event does not reach the minimum proof-of-work threshold. See [NIP-13](13.md)
* `rate-limited` - for OK or CLOSED, when the relay rejects the event due to rate limiting, or too many subscriptions being open
- The [NIP-42](42.md) extensions are:
* `auth-required` - for OK or CLOSED, when a client has not performed `AUTH` and the relay requires that to fulfill the query or write the event.
* `redacted` - for CLOSED, when some matching events were not served due to the requester not being authenticated or authorized.
* `restricted` - for OK or CLOSED, when a client has already performed `AUTH` but the key used to perform it is still not allowed by the relay or is exceeding its authorization.

1
42.md
View File

@ -55,6 +55,7 @@ This NIP defines two new prefixes that can be used in `OK` (in response to event
- `"auth-required: "` - for when a client has not performed `AUTH` and the relay requires that to fulfill the query or write the event.
- `"restricted: "` - for when a client has already performed `AUTH` but the key used to perform it is still not allowed by the relay or is exceeding its authorization.
- `"redacted: "` - on `CLOSED` for when some matching events were not served due to the requester not being authenticated or authorized.
## Protocol flow