Language

Choose a language

/build/rpc / cosign / discussion

cosign.discussion_scopes

cosign.discussion_scopes ( since limit force_refresh only_live_verified ) List active discussion scopes discovered on relays. Returns recent model/challenge discussion threads aggregated from relay posts. Arguments: 1. since (numeric, optional, default=0) Only include scopes with posts after this unix timestamp 2. limit (numeric, optional, default=50) Maximum number of scopes to return 3. force_refresh (boolean, optional, default=false) Force relay re-query before aggregating scopes 4. only_live_verified (boolean, optional, default=false) Only return scopes that contain at least one verified, unexpired post Result: { (json object) "scopes" : [ (json array) { (json object) "scope_type" : "str", (string) Scope type "scope_id" : "hex", (string) Scope id "latest_created_at" : n, (numeric) Unix timestamp of latest post in this scope "post_count" : n, (numeric) Number of posts observed for this scope "latest_post_id" : "str", (string) Latest Nostr event id "latest_content_preview" : "str", (string) Preview of latest post content "model_identifier" : "str", (string, optional) Human-readable model_name@commit_id alias for the scope when present in discussion relay data "has_live_verified_posts" : true|false, (boolean, optional) Whether the scope has at least one verified, unexpired post "live_verified_post_count" : n (numeric, optional) Number of verified, unexpired posts in the scope }, ... ] } Examples: > bitcoin-cli cosign.discussion_scopes

Signature

cosign.discussion_scopes(since?: number, limit?: number, force_refresh?: boolean, only_live_verified?: boolean) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"cosign.discussion_scopes","params":[0,50,false,false]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
sincenumberOnly include scopes with posts after this unix timestamp
limitnumberMaximum number of scopes to return
force_refreshbooleanForce relay re-query before aggregating scopes
only_live_verifiedbooleanOnly return scopes that contain at least one verified, unexpired post

Result

Type:  any

{ (json object) "scopes" : [ (json array) { (json object) "scope_type" : "str", (string) Scope type "scope_id" : "hex", (string) Scope id "latest_created_at" : n, (numeric) Unix timestamp of latest post in this scope "post_count" : n, (numeric) Number of posts observed for this scope "latest_post_id" : "str", (string) Latest Nostr event id "latest_content_preview" : "str", (string) Preview of latest post content "model_identifier" : "str", (string, optional) Human-readable model_name@commit_id alias for the scope when present in discussion relay data "has_live_verified_posts" : true|false, (boolean, optional) Whether the scope has at least one verified, unexpired post "live_verified_post_count" : n (numeric, optional) Number of verified, unexpired posts in the scope }, ... ] }

Source: services/core-node/bcore/src/rpc/cosign.cpp:4120

C++ symbol: cosign_discussion_scopes