diff options
| author | Francisco Calderón <fjcalderon@gmail.com> | 2024-11-04 15:39:21 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-04 15:39:21 -0300 |
| commit | 03f3bc39678262ecbd5d870c9da44723023557ff (patch) | |
| tree | e75ecf32d3bc906a8b26314488a1ae90996169c1 /11.md | |
| parent | f72a2f69ed93cf442e83bf9e7e16f6c06da40384 (diff) | |
| parent | 6bcd89c097e97e65dbc95e7c6b7b8348e8dd6b5c (diff) | |
Merge branch 'master' into p2p-nip
Diffstat (limited to '11.md')
| -rw-r--r-- | 11.md | 32 |
1 files changed, 18 insertions, 14 deletions
| @@ -2,7 +2,7 @@ NIP-11 | |||
| 2 | ====== | 2 | ====== |
| 3 | 3 | ||
| 4 | Relay Information Document | 4 | Relay Information Document |
| 5 | --------------------------- | 5 | -------------------------- |
| 6 | 6 | ||
| 7 | `draft` `optional` | 7 | `draft` `optional` |
| 8 | 8 | ||
| @@ -66,7 +66,7 @@ These are limitations imposed by the relay on clients. Your client | |||
| 66 | should expect that requests which exceed these *practical* limitations | 66 | should expect that requests which exceed these *practical* limitations |
| 67 | are rejected or fail immediately. | 67 | are rejected or fail immediately. |
| 68 | 68 | ||
| 69 | ```json | 69 | ```jsonc |
| 70 | { | 70 | { |
| 71 | "limitation": { | 71 | "limitation": { |
| 72 | "max_message_length": 16384, | 72 | "max_message_length": 16384, |
| @@ -83,7 +83,7 @@ are rejected or fail immediately. | |||
| 83 | "created_at_lower_limit": 31536000, | 83 | "created_at_lower_limit": 31536000, |
| 84 | "created_at_upper_limit": 3 | 84 | "created_at_upper_limit": 3 |
| 85 | }, | 85 | }, |
| 86 | ... | 86 | // other fields... |
| 87 | } | 87 | } |
| 88 | ``` | 88 | ``` |
| 89 | 89 | ||
| @@ -146,14 +146,15 @@ Retention times are given in seconds, with `null` indicating infinity. | |||
| 146 | If zero is provided, this means the event will not be stored at | 146 | If zero is provided, this means the event will not be stored at |
| 147 | all, and preferably an error will be provided when those are received. | 147 | all, and preferably an error will be provided when those are received. |
| 148 | 148 | ||
| 149 | ```json | 149 | ```jsonc |
| 150 | { | 150 | { |
| 151 | "retention": [ | 151 | "retention": [ |
| 152 | {"kinds": [0, 1, [5, 7], [40, 49]], "time": 3600}, | 152 | {"kinds": [0, 1, [5, 7], [40, 49]], "time": 3600}, |
| 153 | {"kinds": [[40000, 49999]], "time": 100}, | 153 | {"kinds": [[40000, 49999]], "time": 100}, |
| 154 | {"kinds": [[30000, 39999]], "count": 1000}, | 154 | {"kinds": [[30000, 39999]], "count": 1000}, |
| 155 | {"time": 3600, "count": 10000} | 155 | {"time": 3600, "count": 10000} |
| 156 | ] | 156 | ], |
| 157 | // other fields... | ||
| 157 | } | 158 | } |
| 158 | ``` | 159 | ``` |
| 159 | 160 | ||
| @@ -172,7 +173,7 @@ There is no need to specify retention times for _ephemeral events_ since they ar | |||
| 172 | ### Content Limitations | 173 | ### Content Limitations |
| 173 | 174 | ||
| 174 | Some relays may be governed by the arbitrary laws of a nation state. This | 175 | Some relays may be governed by the arbitrary laws of a nation state. This |
| 175 | may limit what content can be stored in cleartext on those relays. All | 176 | may limit what content can be stored in clear-text on those relays. All |
| 176 | clients are encouraged to use encryption to work around this limitation. | 177 | clients are encouraged to use encryption to work around this limitation. |
| 177 | 178 | ||
| 178 | It is not possible to describe the limitations of each country's laws | 179 | It is not possible to describe the limitations of each country's laws |
| @@ -183,13 +184,13 @@ countries' laws might end up being enforced on them, and then | |||
| 183 | indirectly on their users' content. | 184 | indirectly on their users' content. |
| 184 | 185 | ||
| 185 | Users should be able to avoid relays in countries they don't like, | 186 | Users should be able to avoid relays in countries they don't like, |
| 186 | and/or select relays in more favourable zones. Exposing this | 187 | and/or select relays in more favorable zones. Exposing this |
| 187 | flexibility is up to the client software. | 188 | flexibility is up to the client software. |
| 188 | 189 | ||
| 189 | ```json | 190 | ```jsonc |
| 190 | { | 191 | { |
| 191 | "relay_countries": [ "CA", "US" ], | 192 | "relay_countries": [ "CA", "US" ], |
| 192 | ... | 193 | // other fields... |
| 193 | } | 194 | } |
| 194 | ``` | 195 | ``` |
| 195 | 196 | ||
| @@ -208,12 +209,12 @@ local community. This would encourage users to follow the global | |||
| 208 | feed on that relay, in addition to their usual individual follows. | 209 | feed on that relay, in addition to their usual individual follows. |
| 209 | To support this goal, relays MAY specify some of the following values. | 210 | To support this goal, relays MAY specify some of the following values. |
| 210 | 211 | ||
| 211 | ```json | 212 | ```jsonc |
| 212 | { | 213 | { |
| 213 | "language_tags": ["en", "en-419"], | 214 | "language_tags": ["en", "en-419"], |
| 214 | "tags": ["sfw-only", "bitcoin-only", "anime"], | 215 | "tags": ["sfw-only", "bitcoin-only", "anime"], |
| 215 | "posting_policy": "https://example.com/posting-policy.html", | 216 | "posting_policy": "https://example.com/posting-policy.html", |
| 216 | ... | 217 | // other fields... |
| 217 | } | 218 | } |
| 218 | ``` | 219 | ``` |
| 219 | 220 | ||
| @@ -260,10 +261,10 @@ Relays that require payments may want to expose their fee schedules. | |||
| 260 | 261 | ||
| 261 | A URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape. | 262 | A URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape. |
| 262 | 263 | ||
| 263 | ```json | 264 | ```jsonc |
| 264 | { | 265 | { |
| 265 | "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg", | 266 | "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg", |
| 266 | ... | 267 | // other fields... |
| 267 | } | 268 | } |
| 268 | ``` | 269 | ``` |
| 269 | 270 | ||
| @@ -271,9 +272,11 @@ A URL pointing to an image to be used as an icon for the relay. Recommended to b | |||
| 271 | 272 | ||
| 272 | As of 2 May 2023 the following command provided these results: | 273 | As of 2 May 2023 the following command provided these results: |
| 273 | 274 | ||
| 275 | ```bash | ||
| 276 | $ curl -H "Accept: application/nostr+json" https://eden.nostr.land | jq | ||
| 274 | ``` | 277 | ``` |
| 275 | ~> curl -H "Accept: application/nostr+json" https://eden.nostr.land | jq | ||
| 276 | 278 | ||
| 279 | ```json | ||
| 277 | { | 280 | { |
| 278 | "description": "nostr.land family of relays (us-or-01)", | 281 | "description": "nostr.land family of relays (us-or-01)", |
| 279 | "name": "nostr.land", | 282 | "name": "nostr.land", |
| @@ -312,3 +315,4 @@ As of 2 May 2023 the following command provided these results: | |||
| 312 | ] | 315 | ] |
| 313 | }, | 316 | }, |
| 314 | } | 317 | } |
| 318 | ``` | ||