diff options
Diffstat (limited to '01.md')
| -rw-r--r-- | 01.md | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -78,8 +78,8 @@ This NIP defines 3 standard tags that can be used across all event kinds with th | |||
| 78 | - The `e` tag, used to refer to an event: `["e", <32-bytes lowercase hex of the id of another event>, <recommended relay URL, optional>]` | 78 | - The `e` tag, used to refer to an event: `["e", <32-bytes lowercase hex of the id of another event>, <recommended relay URL, optional>]` |
| 79 | - The `p` tag, used to refer to another user: `["p", <32-bytes lowercase hex of a pubkey>, <recommended relay URL, optional>]` | 79 | - The `p` tag, used to refer to another user: `["p", <32-bytes lowercase hex of a pubkey>, <recommended relay URL, optional>]` |
| 80 | - The `a` tag, used to refer to a (maybe parameterized) replaceable event | 80 | - The `a` tag, used to refer to a (maybe parameterized) replaceable event |
| 81 | - for a parameterized replaceable event: `["a", <kind integer>:<32-bytes lowercase hex of a pubkey>:<d tag value>, <recommended relay URL, optional>]` | 81 | - for an addressable event: `["a", <kind integer>:<32-bytes lowercase hex of a pubkey>:<d tag value>, <recommended relay URL, optional>]` |
| 82 | - for a non-parameterized replaceable event: `["a", <kind integer>:<32-bytes lowercase hex of a pubkey>:, <recommended relay URL, optional>]` | 82 | - for a normal replaceable event: `["a", <kind integer>:<32-bytes lowercase hex of a pubkey>:, <recommended relay URL, optional>]` |
| 83 | 83 | ||
| 84 | As a convention, all single-letter (only english alphabet letters: a-z, A-Z) key tags are expected to be indexed by relays, such that it is possible, for example, to query or subscribe to events that reference the event `"5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"` by using the `{"#e": ["5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"]}` filter. | 84 | As a convention, all single-letter (only english alphabet letters: a-z, A-Z) key tags are expected to be indexed by relays, such that it is possible, for example, to query or subscribe to events that reference the event `"5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"` by using the `{"#e": ["5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"]}` filter. |
| 85 | 85 | ||
| @@ -125,8 +125,8 @@ Clients can send 3 types of messages, which must be JSON arrays, according to th | |||
| 125 | "authors": <a list of lowercase pubkeys, the pubkey of an event must be one of these>, | 125 | "authors": <a list of lowercase pubkeys, the pubkey of an event must be one of these>, |
| 126 | "kinds": <a list of a kind numbers>, | 126 | "kinds": <a list of a kind numbers>, |
| 127 | "#<single-letter (a-zA-Z)>": <a list of tag values, for #e — a list of event ids, for #p — a list of pubkeys, etc.>, | 127 | "#<single-letter (a-zA-Z)>": <a list of tag values, for #e — a list of event ids, for #p — a list of pubkeys, etc.>, |
| 128 | "since": <an integer unix timestamp in seconds, events must be newer than this to pass>, | 128 | "since": <an integer unix timestamp in seconds. Events must have a created_at >= to this to pass>, |
| 129 | "until": <an integer unix timestamp in seconds, events must be older than this to pass>, | 129 | "until": <an integer unix timestamp in seconds. Events must have a created_at <= to this to pass>, |
| 130 | "limit": <maximum number of events relays SHOULD return in the initial query> | 130 | "limit": <maximum number of events relays SHOULD return in the initial query> |
| 131 | } | 131 | } |
| 132 | ``` | 132 | ``` |
| @@ -143,7 +143,7 @@ All conditions of a filter that are specified must match for an event for it to | |||
| 143 | 143 | ||
| 144 | A `REQ` message may contain multiple filters. In this case, events that match any of the filters are to be returned, i.e., multiple filters are to be interpreted as `||` conditions. | 144 | A `REQ` message may contain multiple filters. In this case, events that match any of the filters are to be returned, i.e., multiple filters are to be interpreted as `||` conditions. |
| 145 | 145 | ||
| 146 | The `limit` property of a filter is only valid for the initial query and MUST be ignored afterwards. When `limit: n` is present it is assumed that the events returned in the initial query will be the last `n` events ordered by the `created_at`. It is safe to return less events than `limit` specifies, but it is expected that relays do not return (much) more events than requested so clients don't get unnecessarily overwhelmed by data. | 146 | The `limit` property of a filter is only valid for the initial query and MUST be ignored afterwards. When `limit: n` is present it is assumed that the events returned in the initial query will be the last `n` events ordered by the `created_at`. Newer events should appear first, and in the case of ties the event with the lowest id (first in lexical order) should be first. It is safe to return less events than `limit` specifies, but it is expected that relays do not return (much) more events than requested so clients don't get unnecessarily overwhelmed by data. |
| 147 | 147 | ||
| 148 | ### From relay to client: sending events and notices | 148 | ### From relay to client: sending events and notices |
| 149 | 149 | ||