diff --git a/11.md b/11.md index 21c61e451..3d0e6c36c 100644 --- a/11.md +++ b/11.md @@ -157,7 +157,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 start and end values. Events of indicated kind (or all) are then limited to a `count` and/or time period. @@ -219,7 +219,7 @@ To support this goal, relays MAY specify some of the following values. - `language_tags` is an ordered list of [IETF language tags](https://en.wikipedia.org/wiki/IETF_language_tag) indicating - the major languages spoken on the relay. + the major languages spoken on the relay. `"*"` wildcard can be used for global relays. - `tags` is a list of limitations on the topics to be discussed. For example `sfw-only` indicates that only "Safe For Work" content @@ -244,18 +244,63 @@ processed by appropriate client software. Relays that require payments may want to expose their fee schedules. -```json +```jsonc { - "payments_url": "https://my-relay/payments", - "fees": { - "admission": [{ "amount": 1000000, "unit": "msats" }], - "subscription": [{ "amount": 5000000, "unit": "msats", "period": 2592000 }], - "publication": [{ "kinds": [4], "amount": 100, "unit": "msats" }], - }, - ... + "payments_url":"https://example.com/payments", + "fees":{ + "admission":{ + "amount":1000000, + "unit":"msats" + }, + "subscription":[ + { + "amount":5000000, + "unit":"msats", + "period":2592000 // 1 Month + }, + { + "amount":50000000, + "unit":"msats", + "period":31536000 // 1 Year + } + ], + "publication":[ + { + "kinds":[ + 4 + ], + "amount":100, + "unit":"msats" + }, + { + "kinds":[ + 30023 // Long-from content + ], + "amount":300, + "unit":"msats" + } + ] + }, + // ... } ``` +The `subscription` and `publication` are fee models, their object value and `admission` are fee rules. + +- `payments_url` is a link to a human-readable page which user can use to see and/or pay for fees on this relay. + +- `fees` includes the list of different fees required for each mode on this relay: + + - `admission` is the fee that user need to pay to access to relay, if only `admission` is presented that means only admission fee is required to get access to relay. + + - `subscription` is the fee that user have to pay to access the relay for a fixed amount of time. The `period` field is the access time in seconds. If subscription and admission present at the same time, admission fee MUST get paid as well before subscribing. Otherwise only subscription need to get paid. + + - `publication` is the fee that user needs to pay per event they publish on this relay. The `kinds` is an array of kinds that need a fee equal to `amount` to get published. A limited/not supported kind SHOULD NOT be presented and each kind or range of kinds can be presented in one or more publication fee rules. If publication and subscription models are present at the same time, subscription fee needs to get paid first. + +- `unit` in each fee rule can be set to `BTC`, `sats` and `msats` and can be a float number for `BTC`. + +Access means user can post anything on relay based on its limitation/policies document. The models/rules can be omitted as well. + ### Icon A URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape.