mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-13 02:46:24 +00:00
parent
89a7aa0ea0
commit
d70aa87f07
60
11.md
60
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 }
|
||||||
]
|
]
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ all, and preferably an error will be provided when those are received.
|
|||||||
`retention` is a list of specifications: each will apply to either all kinds, or
|
`retention` is a list of specifications: each will apply to either all kinds, or
|
||||||
a subset of kinds. Ranges may be specified for the kind field as a tuple of inclusive
|
a subset of kinds. Ranges may be specified for the kind field as a tuple of inclusive
|
||||||
start and end values. Events of indicated kind (or all) are then limited to a `count`
|
start and end values. Events of indicated kind (or all) are then limited to a `count`
|
||||||
and or time period.
|
and/or time period.
|
||||||
|
|
||||||
It is possible to effectively blacklist Nostr-based protocols that rely on
|
It is possible to effectively blacklist Nostr-based protocols that rely on
|
||||||
a specific `kind` number, by giving a retention time of zero for those `kind` values.
|
a 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
|
|||||||
and policies which themselves are typically vague and constantly shifting.
|
and policies which themselves are typically vague and constantly shifting.
|
||||||
|
|
||||||
Therefore, this field allows the relay operator to indicate which
|
Therefore, this field allows the relay operator to indicate which
|
||||||
country's' laws might end up being enforced on them, and then
|
countries' laws might end up being enforced on them, and then
|
||||||
indirectly on their users's content.
|
indirectly on their users' content.
|
||||||
|
|
||||||
Users should be able to avoid relays in countries they don't like,
|
Users should be able to avoid relays in countries they don't like,
|
||||||
and/or select relays in more favourable zones. Exposing this
|
and/or select relays in more favourable zones. Exposing this
|
||||||
@ -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",
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -220,7 +220,7 @@ To support this goal, relays MAY specify some of the following values.
|
|||||||
the major languages spoken on the relay.
|
the major languages spoken on the relay.
|
||||||
|
|
||||||
- `tags` is a list of limitations on the topics to be discussed.
|
- `tags` is a list of limitations on the topics to be discussed.
|
||||||
For example `sfw-only` indicates hat only "Safe For Work" content
|
For example `sfw-only` indicates that only "Safe For Work" content
|
||||||
is encouraged on this relay. This relies on assumptions of what the
|
is encouraged on this relay. This relies on assumptions of what the
|
||||||
"work" "community" feels "safe" talking about. In time, a common
|
"work" "community" feels "safe" talking about. In time, a common
|
||||||
set of tags may emerge that allow users to find relays that suit
|
set of tags may emerge that allow users to find relays that suit
|
||||||
@ -245,11 +245,11 @@ 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