diff options
| author | Pablo Fernandez <p@f7z.io> | 2023-11-23 17:52:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-23 17:52:48 +0200 |
| commit | 60256a62675a165c4d4fd9811a19a9cbf6a9e7fd (patch) | |
| tree | 5c450154d373caafc37f324dd01e20338308c9d6 /01.md | |
| parent | 43d50ee42409252a1313928cd437d55fd7bf7bf4 (diff) | |
| parent | 7822a8b12670312aff104ddc03066425882f739d (diff) | |
Merge branch 'master' into nip88
Diffstat (limited to '01.md')
| -rw-r--r-- | 01.md | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -4,7 +4,7 @@ NIP-01 | |||
| 4 | Basic protocol flow description | 4 | Basic protocol flow description |
| 5 | ------------------------------- | 5 | ------------------------------- |
| 6 | 6 | ||
| 7 | `draft` `mandatory` `author:fiatjaf` `author:distbit` `author:scsibug` `author:kukks` `author:jb55` `author:semisol` `author:cameri` `author:Giszmo` | 7 | `draft` `mandatory` |
| 8 | 8 | ||
| 9 | This NIP defines the basic protocol that should be implemented by everybody. New NIPs may add new optional (or mandatory) fields and messages and features to the structures and flows described here. | 9 | This NIP defines the basic protocol that should be implemented by everybody. New NIPs may add new optional (or mandatory) fields and messages and features to the structures and flows described here. |
| 10 | 10 | ||
| @@ -150,7 +150,7 @@ Relays can send 4 types of messages, which must also be JSON arrays, according t | |||
| 150 | This NIP defines no rules for how `NOTICE` messages should be sent or treated. | 150 | This 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"]` |