upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--11.md88
1 files changed, 58 insertions, 30 deletions
diff --git a/11.md b/11.md
index a377364..8951835 100644
--- a/11.md
+++ b/11.md
@@ -69,18 +69,18 @@ are rejected or fail immediately.
69```json 69```json
70{ 70{
71... 71...
72 "limitation": { 72 limitation: {
73 "max_message_length": 16384, 73 max_message_length: 16384,
74 "max_subscriptions": 20, 74 max_subscriptions: 20,
75 "max_filters": 100, 75 max_filters: 100,
76 "max_limit": 5000, 76 max_limit: 5000,
77 "max_subid_length": 100, 77 max_subid_length: 100,
78 "min_prefix": 4, 78 min_prefix: 4,
79 "max_event_tags": 100, 79 max_event_tags: 100,
80 "max_content_length": 8196, 80 max_content_length: 8196,
81 "min_pow_difficulty": 30, 81 min_pow_difficulty: 30,
82 "auth_required": true, 82 auth_required: true,
83 "payment_required": true, 83 payment_required: true,
84 } 84 }
85... 85...
86} 86}
@@ -141,11 +141,11 @@ all, and preferably an error will be provided when those are received.
141```json 141```json
142{ 142{
143... 143...
144 "retention": [ 144 retention: [
145 { "kinds": [0, 1, [5, 7], [40, 49]], "time": 3600 }, 145 { kinds: [0, 1, [5, 7], [40, 49]], time: 3600 },
146 { "kinds": [[40000, 49999]], "time": 100 }, 146 { kinds: [[40000, 49999], time: 100 },
147 { "kinds": [[30000, 39999]], "count": 1000 }, 147 { kinds: [[30000, 39999], count: 1000 },
148 { "time": 3600, "count": 10000 } 148 { time: 3600, count: 10000 }
149 ] 149 ]
150... 150...
151} 151}
@@ -154,7 +154,7 @@ all, and preferably an error will be provided when those are received.
154`retention` is a list of specifications: each will apply to either all kinds, or 154`retention` is a list of specifications: each will apply to either all kinds, or
155a subset of kinds. Ranges may be specified for the kind field as a tuple of inclusive 155a subset of kinds. Ranges may be specified for the kind field as a tuple of inclusive
156start and end values. Events of indicated kind (or all) are then limited to a `count` 156start and end values. Events of indicated kind (or all) are then limited to a `count`
157and/or time period. 157and or time period.
158 158
159It is possible to effectively blacklist Nostr-based protocols that rely on 159It is possible to effectively blacklist Nostr-based protocols that rely on
160a specific `kind` number, by giving a retention time of zero for those `kind` values. 160a specific `kind` number, by giving a retention time of zero for those `kind` values.
@@ -175,8 +175,8 @@ It is not possible to describe the limitations of each country's laws
175and policies which themselves are typically vague and constantly shifting. 175and policies which themselves are typically vague and constantly shifting.
176 176
177Therefore, this field allows the relay operator to indicate which 177Therefore, this field allows the relay operator to indicate which
178countries' laws might end up being enforced on them, and then 178country's' laws might end up being enforced on them, and then
179indirectly on their users' content. 179indirectly on their users's content.
180 180
181Users should be able to avoid relays in countries they don't like, 181Users should be able to avoid relays in countries they don't like,
182and/or select relays in more favourable zones. Exposing this 182and/or select relays in more favourable zones. Exposing this
@@ -185,7 +185,7 @@ flexibility is up to the client software.
185```json 185```json
186{ 186{
187... 187...
188 "relay_countries": [ "CA", "US" ], 188 relay_countries: [ 'CA', 'US' ],
189... 189...
190} 190}
191``` 191```
@@ -208,9 +208,9 @@ To support this goal, relays MAY specify some of the following values.
208```json 208```json
209{ 209{
210... 210...
211 "language_tags": [ "en", "en-419" ], 211 language_tags: [ 'en', 'en-419' ],
212 "tags": [ "sfw-only", "bitcoin-only", "anime" ], 212 tags: [ 'sfw-only', 'bitcoin-only', 'anime' ],
213 "posting_policy": "https://example.com/posting-policy.html", 213 posting_policy: 'https://example.com/posting-policy.html',
214... 214...
215} 215}
216``` 216```
@@ -220,7 +220,7 @@ To support this goal, relays MAY specify some of the following values.
220 the major languages spoken on the relay. 220 the major languages spoken on the relay.
221 221
222- `tags` is a list of limitations on the topics to be discussed. 222- `tags` is a list of limitations on the topics to be discussed.
223 For example `sfw-only` indicates that only "Safe For Work" content 223 For example `sfw-only` indicates hat only "Safe For Work" content
224 is encouraged on this relay. This relies on assumptions of what the 224 is encouraged on this relay. This relies on assumptions of what the
225 "work" "community" feels "safe" talking about. In time, a common 225 "work" "community" feels "safe" talking about. In time, a common
226 set of tags may emerge that allow users to find relays that suit 226 set of tags may emerge that allow users to find relays that suit
@@ -245,12 +245,40 @@ Relays that require payments may want to expose their fee schedules.
245```json 245```json
246{ 246{
247... 247...
248 "payments_url": "https://my-relay/payments", 248 payments_url: "https://my-relay/payments",
249 "fees": { 249 fees: {
250 "admission": [{ "amount": 1000000, "unit": "msats" }], 250 "admission": [{ amount: 1000000, unit: 'msats' }],
251 "subscription": [{ "amount": 5000000, "unit": "msats", "period": 2592000 }], 251 "subscription": [{ amount: 5000000, unit: 'msats', period: 2592000 }],
252 "publication": [{ "kinds": [4], "amount": 100, "unit": "msats" }], 252 "publication": [{ kinds: [4], amount: 100, unit: 'msats' }],
253 }, 253 },
254... 254...
255} 255}
256``` 256```
257
258### Examples ###
259As of 2 May 2023 the following `curl` command provided these results.
260
261 >curl -H "Accept: application/nostr+json" https://eden.nostr.land
262
263 {"name":"eden.nostr.land",
264 "description":"Eden Nostr Land - Toronto 1-01",
265 "pubkey":"00000000827ffaa94bfea288c3dfce4422c794fbb96625b6b31e9049f729d700",
266 "contact":"me@ricardocabral.io",
267 "supported_nips":[1,2,4,9,11,12,15,16,20,22,26,28,33,40],
268 "supported_nip_extensions":["11a"],
269 "software":"git+https://github.com/Cameri/nostream.git",
270 "version":"1.22.6",
271 "limitation":{"max_message_length":1048576,
272 "max_subscriptions":10,
273 "max_filters":2500,
274 "max_limit":5000,
275 "max_subid_length":256,
276 "min_prefix":4,
277 "max_event_tags":2500,
278 "max_content_length":65536,
279 "min_pow_difficulty":0,
280 "auth_required":false,
281 "payment_required":true},
282 "payments_url":"https://eden.nostr.land/invoices",
283 "fees":{"admission":[{"amount":5000000,"unit":"msats"}],
284 "publication":[]}}