diff --git a/45.md b/45.md index 87e80002..f0267f6b 100644 --- a/45.md +++ b/45.md @@ -14,13 +14,13 @@ Some queries a client may want to execute against connected relays are prohibiti ## Filters and return values -This NIP defines a verb called `COUNT`, which accepts a subscription id and filters as specified in [NIP 01](01.md). +This NIP defines the verb `COUNT`, which accepts a subscription id and filters as specified in [NIP 01](01.md). ``` ["COUNT", , ...] ``` -Counts are returned using a `COUNT` response in the form `{count: }`. Relays may use probabilistic counts to reduce compute requirements. +Counts are returned using a `COUNT` response with positional "count" objects in the form `{"count": }`. Relays may use probabilistic counts to reduce compute requirements. ``` ["COUNT", , {"count": }] @@ -36,4 +36,8 @@ Examples: # Count posts and reactions ["COUNT", , {"kinds": [1, 7], "authors": []}] ["COUNT", , {"count": 5}] + +# Both of the above in one `COUNT` +["COUNT", , {"kinds": [3], "#p": []}, {"kinds": [1, 7], "authors": []}] +["COUNT", , {"count": 238}, {"count": 5}] ```