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:
authorPablo Fernandez <p@f7z.io>2023-10-15 21:30:42 +0300
committerGitHub <noreply@github.com>2023-10-15 21:30:42 +0300
commita482f47ae4c36d38062cd0fd3ee6235e57691673 (patch)
treea16f57208cd3c3ef74237dafcef277f16d70e688 /45.md
parentd9400e1e7b08225aedb6c78b522c5ad07b5198b4 (diff)
parent202e18f2b256646148805880ed58731c1c8b2b9b (diff)
Merge branch 'master' into vending-machine
Diffstat (limited to '45.md')
-rw-r--r--45.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/45.md b/45.md
index a525391..7b11950 100644
--- a/45.md
+++ b/45.md
@@ -21,6 +21,7 @@ This NIP defines the verb `COUNT`, which accepts a subscription id and filters a
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>}`.
24 25
25``` 26```
26["COUNT", <subscription_id>, {"count": <integer>}] 27["COUNT", <subscription_id>, {"count": <integer>}]
@@ -36,4 +37,8 @@ Examples:
36# Count posts and reactions 37# Count posts and reactions
37["COUNT", <subscription_id>, {"kinds": [1, 7], "authors": [<pubkey>]}] 38["COUNT", <subscription_id>, {"kinds": [1, 7], "authors": [<pubkey>]}]
38["COUNT", <subscription_id>, {"count": 5}] 39["COUNT", <subscription_id>, {"count": 5}]
40
41# Count posts approximately
42["COUNT", <subscription_id>, {"kinds": [1]}]
43["COUNT", <subscription_id>, {"count": 93412452, "approximate": true}]
39``` 44```