mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-13 23:39:08 -05:00
Replace extra endpoint with query param
This commit is contained in:
parent
af4f963e0c
commit
b48a4d0ca7
8
34.md
8
34.md
|
@ -44,14 +44,14 @@ Into this:
|
|||
|
||||
`SELECT * FROM events WHERE kind in (1) ORDER BY nip34a DESC LIMIT 5`
|
||||
|
||||
## Relay Extra Endpoints
|
||||
## Relay Connection URL Query Parameter
|
||||
|
||||
`Relays` MUST make available an extra URL `clients` can connect to for each supported NIP-34 algorithm.
|
||||
For each supported NIP-34 algorithm, the `relay` MUST allow `clients` to specify the algo as a `nip34` query param on connection URL string.
|
||||
|
||||
For example, if supporting the NIP-34a algo, a `relay` whose regular URL is `wss://relay.url/r1` must
|
||||
also respond at `wss://relay.url/r1/nip34a`, i.e. the additional URL has the algo field name appended to the path.
|
||||
also respond at `wss://relay.url/r1?nip34=a`.
|
||||
|
||||
Then when `clients` connect to `wss://relay.url/r1/nip34a` and request events using `limit`
|
||||
Then when `clients` connect to `wss://relay.url/r1?nip34=a` and request events using `limit`
|
||||
filter attribute, the relay will automatically sort events in **descending** order by the `nip34a` event field instead of by `created_at` when replying. Clients can still override the chosen algorithm if using the
|
||||
`nip34` filter attribute.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user