diff --git a/45.md b/45.md index a5253913..7b11950a 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 ``` Counts are returned using a `COUNT` response in the form `{"count": }`. Relays may use probabilistic counts to reduce compute requirements. +In case a relay uses probabilistic counts, it MAY indicate it in the response with `approximate` key i.e. `{"count": , "approximate": }`. ``` ["COUNT", , {"count": }] @@ -36,4 +37,8 @@ Examples: # Count posts and reactions ["COUNT", , {"kinds": [1, 7], "authors": []}] ["COUNT", , {"count": 5}] + +# Count posts approximately +["COUNT", , {"kinds": [1]}] +["COUNT", , {"count": 93412452, "approximate": true}] ```