diff options
Diffstat (limited to '11.md')
| -rw-r--r-- | 11.md | 58 |
1 files changed, 58 insertions, 0 deletions
| @@ -0,0 +1,58 @@ | |||
| 1 | NIP-11 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Relay Information Document | ||
| 5 | --------------------------- | ||
| 6 | |||
| 7 | `draft` `optional` `author:scsibug` | ||
| 8 | |||
| 9 | Relays may provide server metadata to clients to inform them of capabilities, administrative contacts, and various server attributes. This is made available as a JSON document over HTTP, on the same URI as the relay's websocket. | ||
| 10 | |||
| 11 | When a relay receives an HTTP(s) request with an `Accept` header of `application/nostr+json` to a URI supporting WebSocket upgrades, they SHOULD return a document with the following structure. | ||
| 12 | |||
| 13 | ```json | ||
| 14 | { | ||
| 15 | name: <string identifying relay>, | ||
| 16 | description: <string with detailed information>, | ||
| 17 | pubkey: <administrative contact pubkey>, | ||
| 18 | contact: <administrative alternate contact>, | ||
| 19 | supported_nips: <a list of NIP numbers supported by the relay>, | ||
| 20 | software: <string identifying relay software URL>, | ||
| 21 | version: <string version identifier> | ||
| 22 | } | ||
| 23 | ``` | ||
| 24 | |||
| 25 | Any field may be omitted, and clients MUST ignore any additional fields they do not understand. | ||
| 26 | |||
| 27 | Field Descriptions | ||
| 28 | ----------------- | ||
| 29 | |||
| 30 | ### Name ### | ||
| 31 | |||
| 32 | A relay may select a `name` for use in client software. This is a string, and SHOULD be less than 30 characters to avoid client truncation. | ||
| 33 | |||
| 34 | ### Description ### | ||
| 35 | |||
| 36 | Detailed 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 | |||
| 38 | ### Pubkey ### | ||
| 39 | |||
| 40 | An 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-04`) to a system administrator. Expected uses of this address are to report abuse or illegal content, file bug reports, or request other technical assistance. | ||
| 41 | |||
| 42 | Relay operators have no obligation to respond to direct messages. | ||
| 43 | |||
| 44 | ### Contact ### | ||
| 45 | |||
| 46 | An alternative contact may be listed under the `contact` field as well, with the same purpose as `pubkey`. Use of a Nostr public key and direct message SHOULD be preferred over this. Contents of this field SHOULD be a URI, using schemes such as `mailto` or `https` to provide users with a means of contact. | ||
| 47 | |||
| 48 | ### Supported NIPs ### | ||
| 49 | |||
| 50 | As the Nostr protocol evolves, some functionality may only be available by relays that implement a specific `NIP`. This field is an array of the integer identifiers of `NIP`s that are implemented in the relay. Examples would include `1`, for `"NIP-01"` and `9`, for `"NIP-09"`. Client-side `NIPs` SHOULD not be advertised, and can be ignored by clients. | ||
| 51 | |||
| 52 | ### Software ### | ||
| 53 | |||
| 54 | The relay server implementation MAY be provided in the `software` attribute. If present, this MUST be a URL to the project's homepage. | ||
| 55 | |||
| 56 | ### Version ### | ||
| 57 | |||
| 58 | The relay MAY choose to publish its software version as a string attribute. The string format is defined by the relay implementation. It is recommended this be a version number or commit identifier. | ||