upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2023-11-06 13:18:11 -0300
committerfiatjaf <fiatjaf@gmail.com>2023-11-06 13:18:11 -0300
commit108b7f16f9f75157cffde590a55077e4dfe7c955 (patch)
treec3936b83feabf93473a1e6426d6c3b1fcebd59c6
parent6b566e897cf0a75d9b6671e73bc614333b89d7ae (diff)
clarify that the OK array must have 4 items.
-rw-r--r--01.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/01.md b/01.md
index 183e0ba..cb4f522 100644
--- a/01.md
+++ b/01.md
@@ -150,7 +150,7 @@ Relays can send 4 types of messages, which must also be JSON arrays, according t
150This NIP defines no rules for how `NOTICE` messages should be sent or treated. 150This NIP defines no rules for how `NOTICE` messages should be sent or treated.
151 151
152- `EVENT` messages MUST be sent only with a subscription ID related to a subscription previously initiated by the client (using the `REQ` message above). 152- `EVENT` messages MUST be sent only with a subscription ID related to a subscription previously initiated by the client (using the `REQ` message above).
153- `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: 153- `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:
154 154
155 * `["OK", "b1a649ebe8...", true, ""]` 155 * `["OK", "b1a649ebe8...", true, ""]`
156 * `["OK", "b1a649ebe8...", true, "pow: difficulty 25>=24"]` 156 * `["OK", "b1a649ebe8...", true, "pow: difficulty 25>=24"]`