nip200: comply with nip45 too.

Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
Yonle 2024-01-08 22:31:44 +07:00
parent 0d3573e0f5
commit 15458d8de5
2 changed files with 5 additions and 1 deletions

1
11.md
View File

@ -275,6 +275,7 @@ URL Paths to NoH endpoints.
{
"noh": {
"req": "http://my-relay/__nostr/req",
"count": "http://my-relay/__nostr/count",
"publish": "http://my-relay/__nostr/pub",
"auth": "http://my-relay/__nostr/auth"
},

5
200.md
View File

@ -16,9 +16,10 @@ Relays must ensure that the NoH endpoints **MUST** be served with `Access-Contro
### From client to relay: getting events and sending event
Client could make a request to `req` or `publish` endpoint that were specified in `/.well-known/nostr.json`
Client could make a request to `req`, `count` or `publish` endpoint that were specified in `/.well-known/nostr.json`
When fetching events, Client can optionally specify filters directly into the URI search query:
- `<count>?<filter>`, or
- `<req>?<filter>`
`<filter>` is a querystrings that determines what events will be received in that request. it can have the following attributes:
@ -36,6 +37,7 @@ limit=<maximum number of events relays SHOULD return in the initial query>
Request URL Examples:
- `https://my-relay.com/__nostr/req?kinds=0,1&limit=10`
- `https://my-relay.com/__nostr/req?authors=12345,67890`
- `https://my-relay.com/__nostr/count?count=100&authors=12345,kinds=0`
To send event to relay, Client will need to make POST request to `publish` endpoint with POST body containing the JSON blob of the event.
@ -44,6 +46,7 @@ To send event to relay, Client will need to make POST request to `publish` endpo
Every NoH response is a JSON body that contain the following JSON field:
- `results`: Array of relay response. Usually contain events requested by client.
- `count`: Integer of event counts.
- `notice`: Human readable error.
Relay may also respond with HTTP status code: