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:
Diffstat (limited to '11.md')
-rw-r--r--11.md60
1 files changed, 35 insertions, 25 deletions
diff --git a/11.md b/11.md
index a50038a..8af4f31 100644
--- a/11.md
+++ b/11.md
@@ -2,7 +2,7 @@ NIP-11
2====== 2======
3 3
4Relay Information Document 4Relay Information Document
5--------------------------- 5--------------------------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
@@ -14,6 +14,8 @@ When a relay receives an HTTP(s) request with an `Accept` header of `application
14{ 14{
15 "name": <string identifying relay>, 15 "name": <string identifying relay>,
16 "description": <string with detailed information>, 16 "description": <string with detailed information>,
17 "banner": <a link to an image (e.g. in .jpg, or .png format)>,
18 "icon": <a link to an icon (e.g. in .jpg, or .png format>,
17 "pubkey": <administrative contact pubkey>, 19 "pubkey": <administrative contact pubkey>,
18 "contact": <administrative alternate contact>, 20 "contact": <administrative alternate contact>,
19 "supported_nips": <a list of NIP numbers supported by the relay>, 21 "supported_nips": <a list of NIP numbers supported by the relay>,
@@ -35,6 +37,21 @@ A relay may select a `name` for use in client software. This is a string, and S
35 37
36Detailed plain-text information about the relay may be contained in the `description` string. It is recommended that this contain no markup, formatting or line breaks for word wrapping, and simply use double newline characters to separate paragraphs. There are no limitations on length. 38Detailed plain-text information about the relay may be contained in the `description` string. It is recommended that this contain no markup, formatting or line breaks for word wrapping, and simply use double newline characters to separate paragraphs. There are no limitations on length.
37 39
40### Banner
41
42To make nostr relay management more user friendly, an effort should be made by relay owners to communicate with non-dev non-technical nostr end users. A banner is a visual representation of the relay. It should aim to visually communicate the brand of the relay, complementing the text `Description`. [Here is an example banner](https://image.nostr.build/232ddf6846e8aea5a61abcd70f9222ab521f711aa545b7ab02e430248fa3a249.png) mockup as visualized in Damus iOS relay view of the Damus relay.
43
44### Icon
45
46Icon is a compact visual representation of the relay for use in UI with limited real estate such as a nostr user's relay list view. Below is an example URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape.
47
48```jsonc
49{
50 "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg",
51 // other fields...
52}
53```
54
38### Pubkey 55### Pubkey
39 56
40An administrative contact may be listed with a `pubkey`, in the same format as Nostr events (32-byte hex for a `secp256k1` public key). If a contact is listed, this provides clients with a recommended address to send encrypted direct messages (See [NIP-17](17.md)) to a system administrator. Expected uses of this address are to report abuse or illegal content, file bug reports, or request other technical assistance. 57An administrative contact may be listed with a `pubkey`, in the same format as Nostr events (32-byte hex for a `secp256k1` public key). If a contact is listed, this provides clients with a recommended address to send encrypted direct messages (See [NIP-17](17.md)) to a system administrator. Expected uses of this address are to report abuse or illegal content, file bug reports, or request other technical assistance.
@@ -66,7 +83,7 @@ These are limitations imposed by the relay on clients. Your client
66should expect that requests which exceed these *practical* limitations 83should expect that requests which exceed these *practical* limitations
67are rejected or fail immediately. 84are rejected or fail immediately.
68 85
69```json 86```jsonc
70{ 87{
71 "limitation": { 88 "limitation": {
72 "max_message_length": 16384, 89 "max_message_length": 16384,
@@ -83,7 +100,7 @@ are rejected or fail immediately.
83 "created_at_lower_limit": 31536000, 100 "created_at_lower_limit": 31536000,
84 "created_at_upper_limit": 3 101 "created_at_upper_limit": 3
85 }, 102 },
86 ... 103 // other fields...
87} 104}
88``` 105```
89 106
@@ -146,14 +163,15 @@ Retention times are given in seconds, with `null` indicating infinity.
146If zero is provided, this means the event will not be stored at 163If zero is provided, this means the event will not be stored at
147all, and preferably an error will be provided when those are received. 164all, and preferably an error will be provided when those are received.
148 165
149```json 166```jsonc
150{ 167{
151 "retention": [ 168 "retention": [
152 {"kinds": [0, 1, [5, 7], [40, 49]], "time": 3600}, 169 {"kinds": [0, 1, [5, 7], [40, 49]], "time": 3600},
153 {"kinds": [[40000, 49999]], "time": 100}, 170 {"kinds": [[40000, 49999]], "time": 100},
154 {"kinds": [[30000, 39999]], "count": 1000}, 171 {"kinds": [[30000, 39999]], "count": 1000},
155 {"time": 3600, "count": 10000} 172 {"time": 3600, "count": 10000}
156 ] 173 ],
174 // other fields...
157} 175}
158``` 176```
159 177
@@ -172,7 +190,7 @@ There is no need to specify retention times for _ephemeral events_ since they ar
172### Content Limitations 190### Content Limitations
173 191
174Some relays may be governed by the arbitrary laws of a nation state. This 192Some relays may be governed by the arbitrary laws of a nation state. This
175may limit what content can be stored in cleartext on those relays. All 193may limit what content can be stored in clear-text on those relays. All
176clients are encouraged to use encryption to work around this limitation. 194clients are encouraged to use encryption to work around this limitation.
177 195
178It is not possible to describe the limitations of each country's laws 196It is not possible to describe the limitations of each country's laws
@@ -183,13 +201,13 @@ countries' laws might end up being enforced on them, and then
183indirectly on their users' content. 201indirectly on their users' content.
184 202
185Users should be able to avoid relays in countries they don't like, 203Users should be able to avoid relays in countries they don't like,
186and/or select relays in more favourable zones. Exposing this 204and/or select relays in more favorable zones. Exposing this
187flexibility is up to the client software. 205flexibility is up to the client software.
188 206
189```json 207```jsonc
190{ 208{
191 "relay_countries": [ "CA", "US" ], 209 "relay_countries": [ "CA", "US" ],
192 ... 210 // other fields...
193} 211}
194``` 212```
195 213
@@ -208,12 +226,12 @@ local community. This would encourage users to follow the global
208feed on that relay, in addition to their usual individual follows. 226feed on that relay, in addition to their usual individual follows.
209To support this goal, relays MAY specify some of the following values. 227To support this goal, relays MAY specify some of the following values.
210 228
211```json 229```jsonc
212{ 230{
213 "language_tags": ["en", "en-419"], 231 "language_tags": ["en", "en-419"],
214 "tags": ["sfw-only", "bitcoin-only", "anime"], 232 "tags": ["sfw-only", "bitcoin-only", "anime"],
215 "posting_policy": "https://example.com/posting-policy.html", 233 "posting_policy": "https://example.com/posting-policy.html",
216 ... 234 // other fields...
217} 235}
218``` 236```
219 237
@@ -244,7 +262,7 @@ processed by appropriate client software.
244 262
245Relays that require payments may want to expose their fee schedules. 263Relays that require payments may want to expose their fee schedules.
246 264
247```json 265```jsonc
248{ 266{
249 "payments_url": "https://my-relay/payments", 267 "payments_url": "https://my-relay/payments",
250 "fees": { 268 "fees": {
@@ -252,18 +270,7 @@ Relays that require payments may want to expose their fee schedules.
252 "subscription": [{ "amount": 5000000, "unit": "msats", "period": 2592000 }], 270 "subscription": [{ "amount": 5000000, "unit": "msats", "period": 2592000 }],
253 "publication": [{ "kinds": [4], "amount": 100, "unit": "msats" }], 271 "publication": [{ "kinds": [4], "amount": 100, "unit": "msats" }],
254 }, 272 },
255 ... 273 // other fields...
256}
257```
258
259### Icon
260
261A URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape.
262
263```json
264{
265 "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg",
266 ...
267} 274}
268``` 275```
269 276
@@ -271,9 +278,11 @@ A URL pointing to an image to be used as an icon for the relay. Recommended to b
271 278
272As of 2 May 2023 the following command provided these results: 279As of 2 May 2023 the following command provided these results:
273 280
281```bash
282$ curl -H "Accept: application/nostr+json" https://eden.nostr.land | jq
274``` 283```
275~> curl -H "Accept: application/nostr+json" https://eden.nostr.land | jq
276 284
285```json
277{ 286{
278 "description": "nostr.land family of relays (us-or-01)", 287 "description": "nostr.land family of relays (us-or-01)",
279 "name": "nostr.land", 288 "name": "nostr.land",
@@ -312,3 +321,4 @@ As of 2 May 2023 the following command provided these results:
312 ] 321 ]
313 }, 322 },
314} 323}
324```