upleb.uk

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

summaryrefslogtreecommitdiff
path: root/45.md
diff options
context:
space:
mode:
Diffstat (limited to '45.md')
-rw-r--r--45.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/45.md b/45.md
index 780dfb6..6b25396 100644
--- a/45.md
+++ b/45.md
@@ -16,14 +16,14 @@ Some queries a client may want to execute against connected relays are prohibiti
16 16
17This NIP defines the verb `COUNT`, which accepts a subscription id and filters as specified in [NIP 01](01.md) for the verb `REQ`. Multiple filters are OR'd together and aggregated into a single count result. 17This NIP defines the verb `COUNT`, which accepts a subscription id and filters as specified in [NIP 01](01.md) for the verb `REQ`. Multiple filters are OR'd together and aggregated into a single count result.
18 18
19```json 19```
20["COUNT", <subscription_id>, <filters JSON>...] 20["COUNT", <subscription_id>, <filters JSON>...]
21``` 21```
22 22
23Counts are returned using a `COUNT` response in the form `{"count": <integer>}`. Relays may use probabilistic counts to reduce compute requirements. 23Counts are returned using a `COUNT` response in the form `{"count": <integer>}`. Relays may use probabilistic counts to reduce compute requirements.
24In case a relay uses probabilistic counts, it MAY indicate it in the response with `approximate` key i.e. `{"count": <integer>, "approximate": <true|false>}`. 24In case a relay uses probabilistic counts, it MAY indicate it in the response with `approximate` key i.e. `{"count": <integer>, "approximate": <true|false>}`.
25 25
26```json 26```
27["COUNT", <subscription_id>, {"count": <integer>}] 27["COUNT", <subscription_id>, {"count": <integer>}]
28``` 28```
29 29
@@ -33,14 +33,14 @@ Whenever the relay decides to refuse to fulfill the `COUNT` request, it MUST ret
33 33
34### Followers count 34### Followers count
35 35
36```json 36```
37["COUNT", <subscription_id>, {"kinds": [3], "#p": [<pubkey>]}] 37["COUNT", <subscription_id>, {"kinds": [3], "#p": [<pubkey>]}]
38["COUNT", <subscription_id>, {"count": 238}] 38["COUNT", <subscription_id>, {"count": 238}]
39``` 39```
40 40
41### Count posts and reactions 41### Count posts and reactions
42 42
43```json 43```
44["COUNT", <subscription_id>, {"kinds": [1, 7], "authors": [<pubkey>]}] 44["COUNT", <subscription_id>, {"kinds": [1, 7], "authors": [<pubkey>]}]
45["COUNT", <subscription_id>, {"count": 5}] 45["COUNT", <subscription_id>, {"count": 5}]
46``` 46```