upleb.uk

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

summaryrefslogtreecommitdiff
path: root/11.md
diff options
context:
space:
mode:
Diffstat (limited to '11.md')
-rw-r--r--11.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/11.md b/11.md
new file mode 100644
index 0000000..a8c9c53
--- /dev/null
+++ b/11.md
@@ -0,0 +1,58 @@
1NIP-11
2======
3
4Relay Information Document
5---------------------------
6
7`draft` `optional` `author:scsibug`
8
9Relays 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
11When 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
25Any field may be omitted, and clients MUST ignore any additional fields they do not understand.
26
27Field Descriptions
28-----------------
29
30### Name ###
31
32A 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
36Detailed 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
40An 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
42Relay operators have no obligation to respond to direct messages.
43
44### Contact ###
45
46An 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
50As 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
54The 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
58The 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.