From b48a4d0ca745e5c7e6f50cdeaaee00cef5e5b91f Mon Sep 17 00:00:00 2001 From: arthurfranca Date: Wed, 28 Jun 2023 11:23:46 -0300 Subject: [PATCH] Replace extra endpoint with query param --- 34.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/34.md b/34.md index 5b2ef227..3433f421 100644 --- a/34.md +++ b/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.