From 8e5d19ecaf66cddea36e484bccc8ec0a5c69519a Mon Sep 17 00:00:00 2001 From: Kay Date: Sat, 1 Feb 2025 21:58:27 +0000 Subject: [PATCH 01/10] nip-86: updating methods, adding new ones. --- 86.md | 434 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 376 insertions(+), 58 deletions(-) diff --git a/86.md b/86.md index 6f64eee7..dea9dcaf 100644 --- a/86.md +++ b/86.md @@ -17,7 +17,7 @@ When a relay receives an HTTP(s) request with a `Content-Type` header of `applic } ``` -Then it should return a response in the format +Then it should return a response in the below format: ```json { @@ -26,65 +26,383 @@ Then it should return a response in the format } ``` -This is the list of **methods** that may be supported: +## Standard Methods -* `supportedmethods`: - - params: `[]` - - result: `["", "", ...]` (an array with the names of all the other supported methods) -* `banpubkey`: - - params: `["<32-byte-hex-public-key>", ""]` - - result: `true` (a boolean always set to `true`) -* `listbannedpubkeys`: - - params: `[]` - - result: `[{"pubkey": "<32-byte-hex>", "reason": ""}, ...]`, an array of objects -* `allowpubkey`: - - params: `["<32-byte-hex-public-key>", ""]` - - result: `true` (a boolean always set to `true`) -* `listallowedpubkeys`: - - params: `[]` - - result: `[{"pubkey": "<32-byte-hex>", "reason": ""}, ...]`, an array of objects -* `listeventsneedingmoderation`: - - params: `[]` - - result: `[{"id": "<32-byte-hex>", "reason": ""}]`, an array of objects -* `allowevent`: - - params: `["<32-byte-hex-event-id>", ""]` - - result: `true` (a boolean always set to `true`) -* `banevent`: - - params: `["<32-byte-hex-event-id>", ""]` - - result: `true` (a boolean always set to `true`) -* `listbannedevents`: - - params: `[]` - - result: `[{"id": "<32-byte hex>", "reason": ""}, ...]`, an array of objects -* `changerelayname`: - - params: `[""]` - - result: `true` (a boolean always set to `true`) -* `changerelaydescription`: - - params: `[""]` - - result: `true` (a boolean always set to `true`) -* `changerelayicon`: - - params: `[""]` - - result: `true` (a boolean always set to `true`) -* `allowkind`: - - params: `[]` - - result: `true` (a boolean always set to `true`) -* `disallowkind`: - - params: `[]` - - result: `true` (a boolean always set to `true`) -* `listallowedkinds`: - - params: `[]` - - result: `[, ...]`, an array of numbers -* `blockip`: - - params: `["", ""]` - - result: `true` (a boolean always set to `true`) -* `unblockip`: - - params: `[""]` - - result: `true` (a boolean always set to `true`) -* `listblockedips`: - - params: `[]` - - result: `[{"ip": "", "reason": ""}, ...]`, an array of objects +Here is a list of **methods** that MAY be supported: + +### System + +* Supported methods + +**name:** `supported_methods` + +**params:** `[]` + +**result:** + +```json +["", "", /* rest of method names... */ ] +``` + +--- + +* Stats + +**name:** `stats` + +**params:** `[]` + +**result:** + +```jsonc +[ + { + "num_connections": , + "uptime": , + "bytes_received": , + "bytes_sent": , + "num_events": , + "event_bytes": , + "num_files": , + "file_bytes": + // and more... + } +] +``` + +Extra fields MAY be sent from relay depending on implementation. + +--- + +* Set NIP11 + +**name:** `set_nip11` + +**params:** + +```jsonc +[ + { + "name": "new name", + "description": "new description", + "icon": null // removes icon. + // and more... + } +] +``` + +**result:** + +```jsonc +true +``` + +The provided input is a potentially incomplete json object of [NIP-11](./11.md) document. +Relay SHOULD replace provides fields with new ones, add non existing fields and remove fields set to null. + +--- + +* List Events Needing Moderation + +**name:** `list_events_needing_moderation` + +**params:** `[]` + +**result:** + +```json +[{"id": "<32-byte-hex>", "reason": ""}] +``` + +Relay MAY return reported, muted profiles and similar events as result. + +* Write Policy + +* Ban pubkey + +**name:** `ban_pubkey` + +**params:** + +```json +["<32-byte-hex-public-key>", ""] +``` + +**result:** + +```json +true +``` + +Relay MAY remove events sent by `pubkey` and prevent new events from them to be written. + +--- + +* List Banned Pubkeys + +**name:** `list_banned_pubkeys` + +**params:** `[]` + +**result:** + +```json +[{"pubkey": "<32-byte-hex>", "reason": ""}, /* and more... */] +``` + +--- + +* Allow Pubkey + +**name:** `allow_pubkey` + +**params:** + +```json +["<32-byte-hex-public-key>", ""] +``` + +**result:** + +```json +true +``` + +--- + +* List Allowed Pubkeys + +**name:** `list_allowed_pubkeys` + +**params:** `[]` + +**result:** + +```json +[{"pubkey": "<32-byte-hex>", "reason": ""}, /* and more... */] +``` + +--- + +* Allow Event + +**name:** `allow_event` + +**params:** + +```json +["<32-byte-hex-event-id>", ""] +``` + +**result:** + +```json +true +``` + +--- + +* Ban Event + +**name:** `ban_event` + +**params:** + +```json +["<32-byte-hex-event-id>", ""] +``` + +**result:** + +```json +true +``` + +Relay SHOULD delete and prevent re-broadcasting of event. + +--- + +* List Banned Events + +**name:** `list_banned_events` + +**params:** `[]` + +**result:** + +```json +[{"id": "<32-byte hex>", "reason": ""}, ...] +``` + +--- + +* Allow Kinds + +**name:** `allow_kinds` + +**params:** + +```json +[, , /* and more... */] +``` + +**result:** + +```json +true +``` + +--- + +* Disallow Kinds + +**name:** `disallow_kinds` + +**params:** + +```json +[, , /* and more... */] +``` + +**result:** + +```json +true +``` + +--- + +* List Disallowed Kinds + +**name:** `list_disallow_kinds` + +**params:** `[]` + +**result:** + +```json +[, , /* and more... */] +``` + +--- + +* List Allowed Kinds + +**name:** `list_allowed_kinds` + +**params:** `[]` + +**result:** + +```json +[, , /* and more... */] +``` + +--- + +* Block IP + +**name:** `block_ip` + +**params:** + +```json +["", ""] +``` + +**result:** + +```json +true +``` + +--- + +* Unblock IP + +**name:** `unblock_ip` + +**params:** + +```json +[""] +``` + +**result:** + +```json +true +``` + +--- + +* List Blocked IPs + +**name:** `list_blocked_ips` + +**params:** `[]` + +**result:** + +```json +[{"ip": "", "reason": ""}, /* and more... */] +``` + +### Access control + +--- + +* Grant Admin + +**name:** `grant_admin` + +**params:** + +```jsonc +["<32-byte-hex-public-key>", { + "allowed_methods": [ + "method-name", + // an array of method names. + ] +}] +``` + +**result:** + +```json +true +``` + +If admin right is already granted, allowed methods list must be rewritten. + +--- + +* Revoke Admin + +**name:** `revoke_admin` + + +**params:** + +```jsonc +["<32-byte-hex-public-key>", { + "disallowed_methods": [ + "method-name", + // an array of method names. + ] +}] +``` + +**result:** + +```json +true +``` + +If resulting `allowed_methods` list for admin was empty, admin can be removed. ### Authorization -The request must contain an `Authorization` header with a valid [NIP-98](./98.md) event, except the `payload` tag is required. The `u` tag is the relay URL. +The request MUST contain an `Authorization` header with a valid [NIP-98](./98.md) event, except the `payload` tag is required. The `u` tag is the relay URL. -If `Authorization` is not provided or is invalid, the endpoint should return a 401 response. +If `Authorization` is not provided or is invalid, the endpoint should return a response with 401 status code. From 9df4cc9f52066a4c4c2d8f866a5b77f71f9e7442 Mon Sep 17 00:00:00 2001 From: Kay Date: Mon, 3 Feb 2025 13:49:23 +0000 Subject: [PATCH 02/10] formatting/ --- 86.md | 395 ++++++++++++++-------------------------------------------- 1 file changed, 94 insertions(+), 301 deletions(-) diff --git a/86.md b/86.md index dea9dcaf..84e395f8 100644 --- a/86.md +++ b/86.md @@ -30,379 +30,172 @@ Then it should return a response in the below format: Here is a list of **methods** that MAY be supported: -### System - -* Supported methods - -**name:** `supported_methods` - -**params:** `[]` - -**result:** - -```json -["", "", /* rest of method names... */ ] -``` +* `supported_methods`: + - **params:** `[]` + - **result:** `["", "", /* rest of method names... */ ]` (Extra fields MAY be sent from relay depending on implementation.) --- -* Stats - -**name:** `stats` - -**params:** `[]` - -**result:** - -```jsonc -[ - { - "num_connections": , - "uptime": , - "bytes_received": , - "bytes_sent": , - "num_events": , - "event_bytes": , - "num_files": , - "file_bytes": - // and more... - } -] -``` +* `stats`: + - **params:** `[]` + - **result:** + ```jsonc + [ + { + "num_connections": , + "uptime": , + "bytes_received": , + "bytes_sent": , + "num_events": , + "event_bytes": , + "num_files": , + "file_bytes": + // and more... + } + ] + ``` Extra fields MAY be sent from relay depending on implementation. --- -* Set NIP11 - -**name:** `set_nip11` - -**params:** - -```jsonc -[ - { - "name": "new name", - "description": "new description", - "icon": null // removes icon. - // and more... - } -] -``` - -**result:** - -```jsonc -true -``` +* `set_nip11`: + - **params:** + ```jsonc + [ + { + "name": "new name", + "description": "new description", + "icon": null // removes icon. + // and more... + } + ] + ``` + - **result:** `true` (a boolean always set to `true`) The provided input is a potentially incomplete json object of [NIP-11](./11.md) document. Relay SHOULD replace provides fields with new ones, add non existing fields and remove fields set to null. --- -* List Events Needing Moderation +* `list_events_needing_moderation`: + - **params:** `[]` + - **result:** `[{ "id": "<32-byte-hex>", "reason": "" }, ...]` (Relay MAY return reported, muted profiles and similar events as result.) -**name:** `list_events_needing_moderation` +--- -**params:** `[]` - -**result:** - -```json -[{"id": "<32-byte-hex>", "reason": ""}] -``` - -Relay MAY return reported, muted profiles and similar events as result. - -* Write Policy - -* Ban pubkey - -**name:** `ban_pubkey` - -**params:** - -```json -["<32-byte-hex-public-key>", ""] -``` - -**result:** - -```json -true -``` +* `ban_pubkey`: + - **params:** `["<32-byte-hex-public-key>", ""]` + - **result:** `true` (a boolean always set to `true`) Relay MAY remove events sent by `pubkey` and prevent new events from them to be written. --- -* List Banned Pubkeys - -**name:** `list_banned_pubkeys` - -**params:** `[]` - -**result:** - -```json -[{"pubkey": "<32-byte-hex>", "reason": ""}, /* and more... */] -``` +* `list_banned_pubkeys`: + - **params:** `[]` + - **result:** `[{"pubkey": "<32-byte-hex>", "reason": ""}, ...]` (an array of objects) --- -* Allow Pubkey - -**name:** `allow_pubkey` - -**params:** - -```json -["<32-byte-hex-public-key>", ""] -``` - -**result:** - -```json -true -``` +* `allow_pubkey`: + - **params:** `["<32-byte-hex-public-key>", ""]` + - **result:** `true` (a boolean always set to `true`) --- -* List Allowed Pubkeys - -**name:** `list_allowed_pubkeys` - -**params:** `[]` - -**result:** - -```json -[{"pubkey": "<32-byte-hex>", "reason": ""}, /* and more... */] -``` +* `list_allowed_pubkeys`: + - **params:** `[]` + - **result:** `[{"pubkey": "<32-byte-hex>", "reason": ""}, ...]` (an array of objects) --- -* Allow Event - -**name:** `allow_event` - -**params:** - -```json -["<32-byte-hex-event-id>", ""] -``` - -**result:** - -```json -true -``` - ---- - -* Ban Event - -**name:** `ban_event` - -**params:** - -```json -["<32-byte-hex-event-id>", ""] -``` - -**result:** - -```json -true -``` +* `ban_event`: + - **params:** `["<32-byte-hex-event-id>", ""]` + - **result:** `true` (a boolean always set to `true`) Relay SHOULD delete and prevent re-broadcasting of event. --- -* List Banned Events - -**name:** `list_banned_events` - -**params:** `[]` - -**result:** - -```json -[{"id": "<32-byte hex>", "reason": ""}, ...] -``` +* `list_banned_events`: + - **params:** `[]` + - **result:** `[{"id": "<32-byte-hex>", "reason": ""}, ...]` (an array of objects) --- -* Allow Kinds - -**name:** `allow_kinds` - -**params:** - -```json -[, , /* and more... */] -``` - -**result:** - -```json -true -``` +* `allow_event`: + - **params:** `["<32-byte-hex-event-id>", ""]` + - **result:** `true` (a boolean always set to `true`) --- -* Disallow Kinds - -**name:** `disallow_kinds` - -**params:** - -```json -[, , /* and more... */] -``` - -**result:** - -```json -true -``` +* `list_allowed_events`: + - **params:** `[]` + - **result:** `[{"id": "<32-byte-hex>", "reason": ""}, ...]` (an array of objects) --- -* List Disallowed Kinds - -**name:** `list_disallow_kinds` - -**params:** `[]` - -**result:** - -```json -[, , /* and more... */] -``` +* `allow_kinds`: + - **params:** `(, , /* and more... */)` + - **result:** `true` (a boolean always set to `true`) --- -* List Allowed Kinds - -**name:** `list_allowed_kinds` - -**params:** `[]` - -**result:** - -```json -[, , /* and more... */] -``` +* `disallow_kinds`: + - **params:** `(, , /* and more... */)` + - **result:** `true` (a boolean always set to `true`) --- -* Block IP - -**name:** `block_ip` - -**params:** - -```json -["", ""] -``` - -**result:** - -```json -true -``` +* `list_disallow_kinds`: + - **params:** `[]` + - **result:** `(, , /* and more... */)` (an array of objects) --- -* Unblock IP - -**name:** `unblock_ip` - -**params:** - -```json -[""] -``` - -**result:** - -```json -true -``` +* `list_allowed_kinds`: + - **params:** `[]` + - **result:** `(, , /* and more... */)` (an array of objects) --- -* List Blocked IPs - -**name:** `list_blocked_ips` - -**params:** `[]` - -**result:** - -```json -[{"ip": "", "reason": ""}, /* and more... */] -``` - -### Access control +* `bloc_kip`: + - **params:** `["", ""]` + - **result:** `true` (a boolean always set to `true`) --- -* Grant Admin +* `unblock_ip`: + - **params:** `[""]` + - **result:** `true` (a boolean always set to `true`) -**name:** `grant_admin` +--- -**params:** +* `list_blocked_ips`: + - **params:** `[]` + - **result:** `[{"ip": "", "reason": ""}, ...]` (an array of objects) -```jsonc -["<32-byte-hex-public-key>", { - "allowed_methods": [ - "method-name", - // an array of method names. - ] -}] -``` +--- -**result:** - -```json -true -``` +* `grant_admin`: + - **params:** `["<32-byte-hex-public-key>", { "allowed_methods": [...]}]` + - **result:** `true` (a boolean always set to `true`) If admin right is already granted, allowed methods list must be rewritten. --- -* Revoke Admin - -**name:** `revoke_admin` - - -**params:** - -```jsonc -["<32-byte-hex-public-key>", { - "disallowed_methods": [ - "method-name", - // an array of method names. - ] -}] -``` - -**result:** - -```json -true -``` +* `revoke_admin`: + - **params:** `["<32-byte-hex-public-key>", { "disallowed_methods": [...]}]` + - **result:** `true` (a boolean always set to `true`) If resulting `allowed_methods` list for admin was empty, admin can be removed. +--- + ### Authorization -The request MUST contain an `Authorization` header with a valid [NIP-98](./98.md) event, except the `payload` tag is required. The `u` tag is the relay URL. +The request MUST contain an `Authorization` header with a valid [NIP-98](./98.md) event, except the `payload` tag is REQUIRED. The `u` tag is the relay URL. If `Authorization` is not provided or is invalid, the endpoint should return a response with 401 status code. From 77eaaf077a0ae58216c154ec820187d35ad7f93f Mon Sep 17 00:00:00 2001 From: "k." Date: Mon, 3 Feb 2025 13:54:36 +0000 Subject: [PATCH 03/10] typos. --- 86.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/86.md b/86.md index 84e395f8..68e9358a 100644 --- a/86.md +++ b/86.md @@ -32,7 +32,9 @@ Here is a list of **methods** that MAY be supported: * `supported_methods`: - **params:** `[]` - - **result:** `["", "", /* rest of method names... */ ]` (Extra fields MAY be sent from relay depending on implementation.) + - **result:** `["", "", /* rest of method names... */ ]` + +Extra fields MAY be sent from the relay depending on implementation. --- @@ -55,7 +57,7 @@ Here is a list of **methods** that MAY be supported: ] ``` -Extra fields MAY be sent from relay depending on implementation. +Extra fields MAY be sent from the relay depending on implementation. --- @@ -66,7 +68,7 @@ Extra fields MAY be sent from relay depending on implementation. { "name": "new name", "description": "new description", - "icon": null // removes icon. + "icon": null // remove icon. // and more... } ] @@ -74,13 +76,13 @@ Extra fields MAY be sent from relay depending on implementation. - **result:** `true` (a boolean always set to `true`) The provided input is a potentially incomplete json object of [NIP-11](./11.md) document. -Relay SHOULD replace provides fields with new ones, add non existing fields and remove fields set to null. +Relay SHOULD replace provided fields with new ones, add non-existing fields, and remove fields set to null. --- * `list_events_needing_moderation`: - **params:** `[]` - - **result:** `[{ "id": "<32-byte-hex>", "reason": "" }, ...]` (Relay MAY return reported, muted profiles and similar events as result.) + - **result:** `[{ "id": "<32-byte-hex>", "reason": "" }, ...]` (Relay MAY return reported, muted profiles and similar events as a result.) --- @@ -88,7 +90,7 @@ Relay SHOULD replace provides fields with new ones, add non existing fields and - **params:** `["<32-byte-hex-public-key>", ""]` - **result:** `true` (a boolean always set to `true`) -Relay MAY remove events sent by `pubkey` and prevent new events from them to be written. +The relay MAY remove events sent by `pubkey` and prevent new events from being written. --- @@ -182,7 +184,7 @@ Relay SHOULD delete and prevent re-broadcasting of event. - **params:** `["<32-byte-hex-public-key>", { "allowed_methods": [...]}]` - **result:** `true` (a boolean always set to `true`) -If admin right is already granted, allowed methods list must be rewritten. +If the admin right is already granted, the allowed methods list must be rewritten. --- @@ -190,7 +192,7 @@ If admin right is already granted, allowed methods list must be rewritten. - **params:** `["<32-byte-hex-public-key>", { "disallowed_methods": [...]}]` - **result:** `true` (a boolean always set to `true`) -If resulting `allowed_methods` list for admin was empty, admin can be removed. +If the resulting `allowed_methods` list for admin was empty, admin can be removed. --- @@ -198,4 +200,4 @@ If resulting `allowed_methods` list for admin was empty, admin can be removed. The request MUST contain an `Authorization` header with a valid [NIP-98](./98.md) event, except the `payload` tag is REQUIRED. The `u` tag is the relay URL. -If `Authorization` is not provided or is invalid, the endpoint should return a response with 401 status code. +If `Authorization` is not provided or is invalid, the endpoint should return a response with a 401 status code. From 62ae128369837b3e534e6e59e828611809ccc3c0 Mon Sep 17 00:00:00 2001 From: "k." Date: Mon, 3 Feb 2025 18:22:00 +0330 Subject: [PATCH 04/10] Update 86.md --- 86.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/86.md b/86.md index 68e9358a..8a7d07b2 100644 --- a/86.md +++ b/86.md @@ -162,7 +162,7 @@ Relay SHOULD delete and prevent re-broadcasting of event. --- -* `bloc_kip`: +* `block_ip`: - **params:** `["", ""]` - **result:** `true` (a boolean always set to `true`) From c4384ae39021eae97a4105a448bd6969cd7f2f95 Mon Sep 17 00:00:00 2001 From: "k." Date: Tue, 4 Feb 2025 09:27:30 +0330 Subject: [PATCH 05/10] Update 86.md --- 86.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/86.md b/86.md index 8a7d07b2..b0a44629 100644 --- a/86.md +++ b/86.md @@ -150,7 +150,7 @@ Relay SHOULD delete and prevent re-broadcasting of event. --- -* `list_disallow_kinds`: +* `list_disallowed_kinds`: - **params:** `[]` - **result:** `(, , /* and more... */)` (an array of objects) From 34a26f950ed2cd8b3199f0a0e55d996b21e54c3a Mon Sep 17 00:00:00 2001 From: "k." Date: Thu, 6 Feb 2025 09:42:00 +0330 Subject: [PATCH 06/10] Update 86.md --- 86.md | 57 +++++++++++++++++++-------------------------------------- 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/86.md b/86.md index b0a44629..ed1f62a6 100644 --- a/86.md +++ b/86.md @@ -30,7 +30,7 @@ Then it should return a response in the below format: Here is a list of **methods** that MAY be supported: -* `supported_methods`: +* `supportedmethods`: - **params:** `[]` - **result:** `["", "", /* rest of method names... */ ]` @@ -61,32 +61,13 @@ Extra fields MAY be sent from the relay depending on implementation. --- -* `set_nip11`: - - **params:** - ```jsonc - [ - { - "name": "new name", - "description": "new description", - "icon": null // remove icon. - // and more... - } - ] - ``` - - **result:** `true` (a boolean always set to `true`) - -The provided input is a potentially incomplete json object of [NIP-11](./11.md) document. -Relay SHOULD replace provided fields with new ones, add non-existing fields, and remove fields set to null. - ---- - -* `list_events_needing_moderation`: +* `listeventsneedingmoderation`: - **params:** `[]` - **result:** `[{ "id": "<32-byte-hex>", "reason": "" }, ...]` (Relay MAY return reported, muted profiles and similar events as a result.) --- -* `ban_pubkey`: +* `banpubkey`: - **params:** `["<32-byte-hex-public-key>", ""]` - **result:** `true` (a boolean always set to `true`) @@ -94,25 +75,25 @@ The relay MAY remove events sent by `pubkey` and prevent new events from being w --- -* `list_banned_pubkeys`: +* `listbannedpubkeys`: - **params:** `[]` - **result:** `[{"pubkey": "<32-byte-hex>", "reason": ""}, ...]` (an array of objects) --- -* `allow_pubkey`: +* `allowpubkey`: - **params:** `["<32-byte-hex-public-key>", ""]` - **result:** `true` (a boolean always set to `true`) --- -* `list_allowed_pubkeys`: +* `listallowedpubkeys`: - **params:** `[]` - **result:** `[{"pubkey": "<32-byte-hex>", "reason": ""}, ...]` (an array of objects) --- -* `ban_event`: +* `banevent`: - **params:** `["<32-byte-hex-event-id>", ""]` - **result:** `true` (a boolean always set to `true`) @@ -120,67 +101,67 @@ Relay SHOULD delete and prevent re-broadcasting of event. --- -* `list_banned_events`: +* `listbannedevents`: - **params:** `[]` - **result:** `[{"id": "<32-byte-hex>", "reason": ""}, ...]` (an array of objects) --- -* `allow_event`: +* `allowevent`: - **params:** `["<32-byte-hex-event-id>", ""]` - **result:** `true` (a boolean always set to `true`) --- -* `list_allowed_events`: +* `listallowedevents`: - **params:** `[]` - **result:** `[{"id": "<32-byte-hex>", "reason": ""}, ...]` (an array of objects) --- -* `allow_kinds`: +* `allowkinds`: - **params:** `(, , /* and more... */)` - **result:** `true` (a boolean always set to `true`) --- -* `disallow_kinds`: +* `disallowkinds`: - **params:** `(, , /* and more... */)` - **result:** `true` (a boolean always set to `true`) --- -* `list_disallowed_kinds`: +* `listdisallowedkinds`: - **params:** `[]` - **result:** `(, , /* and more... */)` (an array of objects) --- -* `list_allowed_kinds`: +* `listallowedkinds`: - **params:** `[]` - **result:** `(, , /* and more... */)` (an array of objects) --- -* `block_ip`: +* `blockip`: - **params:** `["", ""]` - **result:** `true` (a boolean always set to `true`) --- -* `unblock_ip`: +* `unblockip`: - **params:** `[""]` - **result:** `true` (a boolean always set to `true`) --- -* `list_blocked_ips`: +* `listblockedips`: - **params:** `[]` - **result:** `[{"ip": "", "reason": ""}, ...]` (an array of objects) --- -* `grant_admin`: +* `grantadmin`: - **params:** `["<32-byte-hex-public-key>", { "allowed_methods": [...]}]` - **result:** `true` (a boolean always set to `true`) @@ -188,7 +169,7 @@ If the admin right is already granted, the allowed methods list must be rewritte --- -* `revoke_admin`: +* `revokeadmin`: - **params:** `["<32-byte-hex-public-key>", { "disallowed_methods": [...]}]` - **result:** `true` (a boolean always set to `true`) From 630f593f2b995fcfbf57ce17bf2262025063aa38 Mon Sep 17 00:00:00 2001 From: "k." Date: Sat, 8 Feb 2025 12:01:32 +0000 Subject: [PATCH 07/10] Update 86.md --- 86.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/86.md b/86.md index ed1f62a6..d33aaf8e 100644 --- a/86.md +++ b/86.md @@ -63,7 +63,9 @@ Extra fields MAY be sent from the relay depending on implementation. * `listeventsneedingmoderation`: - **params:** `[]` - - **result:** `[{ "id": "<32-byte-hex>", "reason": "" }, ...]` (Relay MAY return reported, muted profiles and similar events as a result.) + - **result:** `[{ "id": "<32-byte-hex>", "reason": "" }, ...]` + +Relay MAY return reported, muted profiles, and similar events as a result. --- @@ -119,14 +121,14 @@ Relay SHOULD delete and prevent re-broadcasting of event. --- -* `allowkinds`: - - **params:** `(, , /* and more... */)` +* `allowkind`: + - **params:** `` - **result:** `true` (a boolean always set to `true`) --- -* `disallowkinds`: - - **params:** `(, , /* and more... */)` +* `disallowkind`: + - **params:** `` - **result:** `true` (a boolean always set to `true`) --- From 174c22e38990b766860b855d0a970392e6f35a23 Mon Sep 17 00:00:00 2001 From: "k." Date: Sat, 8 Feb 2025 12:02:15 +0000 Subject: [PATCH 08/10] Update 86.md --- 86.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/86.md b/86.md index d33aaf8e..b686ef7d 100644 --- a/86.md +++ b/86.md @@ -122,13 +122,13 @@ Relay SHOULD delete and prevent re-broadcasting of event. --- * `allowkind`: - - **params:** `` + - **params:** `[]` - **result:** `true` (a boolean always set to `true`) --- * `disallowkind`: - - **params:** `` + - **params:** `[]` - **result:** `true` (a boolean always set to `true`) --- From 39b22529e90330721f040456a4f8c065a9070a80 Mon Sep 17 00:00:00 2001 From: "k." Date: Sat, 8 Feb 2025 12:03:36 +0000 Subject: [PATCH 09/10] Update 86.md --- 86.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/86.md b/86.md index b686ef7d..58d2e5d4 100644 --- a/86.md +++ b/86.md @@ -135,13 +135,13 @@ Relay SHOULD delete and prevent re-broadcasting of event. * `listdisallowedkinds`: - **params:** `[]` - - **result:** `(, , /* and more... */)` (an array of objects) + - **result:** `[, , /* and more... */]` (an array of objects) --- * `listallowedkinds`: - **params:** `[]` - - **result:** `(, , /* and more... */)` (an array of objects) + - **result:** `[, , /* and more... */]` (an array of objects) --- From e08c4433f5db4e4d93dbdf332c515aff3a07b9ba Mon Sep 17 00:00:00 2001 From: "k." Date: Sat, 8 Feb 2025 12:27:17 +0000 Subject: [PATCH 10/10] Update 86.md --- 86.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/86.md b/86.md index 58d2e5d4..b82631e1 100644 --- a/86.md +++ b/86.md @@ -42,7 +42,6 @@ Extra fields MAY be sent from the relay depending on implementation. - **params:** `[]` - **result:** ```jsonc - [ { "num_connections": , "uptime": , @@ -54,7 +53,6 @@ Extra fields MAY be sent from the relay depending on implementation. "file_bytes": // and more... } - ] ``` Extra fields MAY be sent from the relay depending on implementation.