mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
clarify that the OK array must have 4 items.
This commit is contained in:
parent
6b566e897c
commit
108b7f16f9
2
01.md
2
01.md
|
@ -150,7 +150,7 @@ Relays can send 4 types of messages, which must also be JSON arrays, according t
|
||||||
This NIP defines no rules for how `NOTICE` messages should be sent or treated.
|
This NIP defines no rules for how `NOTICE` messages should be sent or treated.
|
||||||
|
|
||||||
- `EVENT` messages MUST be sent only with a subscription ID related to a subscription previously initiated by the client (using the `REQ` message above).
|
- `EVENT` messages MUST be sent only with a subscription ID related to a subscription previously initiated by the client (using the `REQ` message above).
|
||||||
- `OK` messages MUST be sent in response to `EVENT` messages received from clients, they must have the 3rd parameter set to `true` when an event has been accepted by the relay, `false` otherwise. The 4th parameter MAY be empty when the 3rd is `true`, otherwise it MUST be a string containing a machine-readable single-word prefix followed by a `:` and then a human-readable message. The standardized machine-readable prefixes are: `duplicate`, `pow`, `blocked`, `rate-limited`, `invalid`, and `error` for when none of that fits. Some examples:
|
- `OK` messages MUST be sent in response to `EVENT` messages received from clients, they must have the 3rd parameter set to `true` when an event has been accepted by the relay, `false` otherwise. The 4th parameter MUST always be present, but MAY be an empty string when the 3rd is `true`, otherwise it MUST be a string formed by a machine-readable single-word prefix followed by a `:` and then a human-readable message. The standardized machine-readable prefixes are: `duplicate`, `pow`, `blocked`, `rate-limited`, `invalid`, and `error` for when none of that fits. Some examples:
|
||||||
|
|
||||||
* `["OK", "b1a649ebe8...", true, ""]`
|
* `["OK", "b1a649ebe8...", true, ""]`
|
||||||
* `["OK", "b1a649ebe8...", true, "pow: difficulty 25>=24"]`
|
* `["OK", "b1a649ebe8...", true, "pow: difficulty 25>=24"]`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user