Add 2 prefixes, and define them all

This commit is contained in:
Mike Dilger 2025-02-12 09:40:26 +13:00
parent 6e7a618e7f
commit 958727e36f
No known key found for this signature in database
GPG Key ID: 47581A78D4329BA4

13
01.md
View File

@ -174,4 +174,15 @@ 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 EVENT, when the relay rejects the event for any reason not better described by another prefix
* `deleted` - for EVENT, when the relay rejects the event because it has been deleted
* `duplicate` - for EVENT, when the relay already has the event
* `error` - for EVENT or CLOSED, used for relay errors and also when no other prefix suits
* `invalid` - for EVENT or CLOSED, when the request is somehow invalid
* `pow` - for EVENT, when the event does not reach the minimum proof-of-work threshold. See [NIP-13](13.md)
* `rate-limited` - for EVENT, when the relay rejects the event due to rate limiting, or too many subscriptions being open
* `redacted` - for CLOSED, when some matching events were not served due to the requester not being authenticated or authorized.
* `restricted` - for EVENT, when the relay rejects the event due to the author or submitter not being authenticated or authorized.