mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
JSON quoting (and other fixes)
This commit is contained in:
parent
3cec80d99e
commit
c7711aa802
53
11.md
53
11.md
|
@ -69,18 +69,18 @@ are rejected or fail immediately.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...
|
...
|
||||||
limitation: {
|
"limitation": {
|
||||||
max_message_length: 16384,
|
"max_message_length": 16384,
|
||||||
max_subscriptions: 20,
|
"max_subscriptions": 20,
|
||||||
max_filters: 100,
|
"max_filters": 100,
|
||||||
max_limit: 5000,
|
"max_limit": 5000,
|
||||||
max_subid_length: 100,
|
"max_subid_length": 100,
|
||||||
min_prefix: 4,
|
"min_prefix": 4,
|
||||||
max_event_tags: 100,
|
"max_event_tags": 100,
|
||||||
max_content_length: 8196,
|
"max_content_length": 8196,
|
||||||
min_pow_difficulty: 30,
|
"min_pow_difficulty": 30,
|
||||||
auth_required: true,
|
"auth_required": true,
|
||||||
payment_required: true,
|
"payment_required": true,
|
||||||
}
|
}
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
@ -141,11 +141,11 @@ all, and preferably an error will be provided when those are received.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...
|
...
|
||||||
retention: [
|
"retention": [
|
||||||
{ kinds: [0, 1, [5, 7], [40, 49]], time: 3600 },
|
{ "kinds": [0, 1, [5, 7], [40, 49]], "time": 3600 },
|
||||||
{ kinds: [[40000, 49999], time: 100 },
|
{ "kinds": [[40000, 49999]], "time": 100 },
|
||||||
{ kinds: [[30000, 39999], count: 1000 },
|
{ "kinds": [[30000, 39999]], "count": 1000 },
|
||||||
{ time: 3600, count: 10000 }
|
{ "time": 3600, "count": 10000 }
|
||||||
]
|
]
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ flexibility is up to the client software.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...
|
...
|
||||||
relay_countries: [ 'CA', 'US' ],
|
"relay_countries": [ "CA", "US" ],
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -208,9 +208,9 @@ To support this goal, relays MAY specify some of the following values.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...
|
...
|
||||||
language_tags: [ 'en', 'en-419' ],
|
"language_tags": [ "en", "en-419" ],
|
||||||
tags: [ 'sfw-only', 'bitcoin-only', 'anime' ],
|
"tags": [ "sfw-only", "bitcoin-only", "anime" ],
|
||||||
posting_policy: 'https://example.com/posting-policy.html',
|
"posting_policy": "https://example.com/posting-policy.html",
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -245,11 +245,12 @@ Relays that require payments may want to expose their fee schedules.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...
|
...
|
||||||
payments_url: "https://my-relay/payments",
|
"payments_url": "https://my-relay/payments",
|
||||||
fees: {
|
"fees": {
|
||||||
"admission": [{ amount: 1000000, unit: 'msats' }],
|
"admission": [{ "amount": 1000000, "unit": "msats" }],
|
||||||
"subscription": [{ amount: 5000000, unit: 'msats', period: 2592000 }],
|
"subscription": [{ "amount": 5000000, "unit": "msats", "period": 2592000 }],
|
||||||
"publication": [{ kinds: [4], amount: 100, unit: 'msats' }],
|
"publication": [{ "kinds": [4], "amount": 100, "unit": "msats" }],
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user