upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/11.md
diff options
context:
space:
mode:
authorkehiy <kehiiiiya@gmail.com>2024-09-03 20:41:31 +0330
committerkehiy <kehiiiiya@gmail.com>2024-09-03 20:41:31 +0330
commite6552476aa2e5ca7256be572a9aa226ec8a022ee (patch)
tree46f14902bd2bfb85e5f3369ece456c46b697b1a2 /11.md
parentb4a2561df7325b8624bc5ffad154ec946ade2f1e (diff)
format(all): json formatting
Diffstat (limited to '11.md')
-rw-r--r--11.md26
1 files changed, 15 insertions, 11 deletions
diff --git a/11.md b/11.md
index 21c61e4..0ca5870 100644
--- a/11.md
+++ b/11.md
@@ -66,7 +66,7 @@ These are limitations imposed by the relay on clients. Your client
66should expect that requests which exceed these *practical* limitations 66should expect that requests which exceed these *practical* limitations
67are rejected or fail immediately. 67are 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.
146If zero is provided, this means the event will not be stored at 146If zero is provided, this means the event will not be stored at
147all, and preferably an error will be provided when those are received. 147all, 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,
186and/or select relays in more favorable zones. Exposing this 187and/or select relays in more favorable zones. Exposing this
187flexibility is up to the client software. 188flexibility 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
208feed on that relay, in addition to their usual individual follows. 209feed on that relay, in addition to their usual individual follows.
209To support this goal, relays MAY specify some of the following values. 210To 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
261A URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape. 262A 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
272As of 2 May 2023 the following command provided these results: 273As 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```