diff --git a/45.md b/45.md index 28e5e969..87e80002 100644 --- a/45.md +++ b/45.md @@ -14,18 +14,26 @@ 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 a filter as specified in [NIP 01](01.md). +This NIP defines a verb called `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. +``` +["COUNT", , {"count": }] +``` + Examples: ``` # Followers count -["COUNT", "", {kinds: [3], '#p': []}] -["COUNT", "", {count: 238}] +["COUNT", , {"kinds": [3], "#p": []}] +["COUNT", , {"count": 238}] # Count posts and reactions -["COUNT", "", {kinds: [1, 7], authors: []}] -["COUNT", "", {count: 5}] +["COUNT", , {"kinds": [1, 7], "authors": []}] +["COUNT", , {"count": 5}] ```