diff options
Diffstat (limited to '11.md')
| -rw-r--r-- | 11.md | 26 |
1 files changed, 15 insertions, 11 deletions
| @@ -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 | ||
| @@ -186,10 +187,10 @@ Users should be able to avoid relays in countries they don't like, | |||
| 186 | and/or select relays in more favorable 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 | ``` | ||