diff options
| author | fiatjaf <fiatjaf@gmail.com> | 2022-08-13 08:24:51 -0300 |
|---|---|---|
| committer | fiatjaf <fiatjaf@gmail.com> | 2022-08-13 08:24:51 -0300 |
| commit | dbbb66c6de46870899dfc2d975211b6298d92871 (patch) | |
| tree | 1db79257659bf5c578f0df759b1315863955215c | |
| parent | 7fe572ec5a7321726c9469f70a93bb278be8d774 (diff) | |
add nip 26: relays list.
| -rw-r--r-- | 26.md | 29 |
1 files changed, 29 insertions, 0 deletions
| @@ -0,0 +1,29 @@ | |||
| 1 | NIP-26 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Relays List | ||
| 5 | ----------- | ||
| 6 | |||
| 7 | `draft` `optional` `author:fiatjaf` | ||
| 8 | |||
| 9 | A special event with kind `10001`, meaning "relay list" is defined as having a list of tags, one for each relay the author uses. | ||
| 10 | |||
| 11 | The content is not used. | ||
| 12 | |||
| 13 | The tags consist of arrays of 3 elements: the first is the relay URL, the second is the "read" condition -- which if set `"true"` means the client is reading events from that relay --, the third is the "write" condition -- which if set to `"true"` means the user is writing events to that relay. | ||
| 14 | |||
| 15 | In the future this NIP will be modified with more fine-grained conditions for writing and reading from relays, based on properties of the filter or of the event respectively, written as strings in a simple language. | ||
| 16 | |||
| 17 | Example: | ||
| 18 | |||
| 19 | ```json | ||
| 20 | { | ||
| 21 | "kind": 10001, | ||
| 22 | "tags": [ | ||
| 23 | ["wss://alicerelay.com/", "true", "false"], | ||
| 24 | ["wss://bobrelay.com/", "true", "true"], | ||
| 25 | ["wss://carolrelay.com/", "false", "true"], | ||
| 26 | ], | ||
| 27 | "content": "", | ||
| 28 | ...other fields | ||
| 29 | ``` | ||