Language

Choose a language

/build/rpc / cosign / governance

cosign.list_governance

cosign.list_governance ( "asset_id" include_expired ) List governance proposals from the bulletin board. Arguments: 1. asset_id (string, optional, default="") Filter by asset ID (empty = all) 2. include_expired (boolean, optional, default=false) Include expired proposals Result: [ (json array) { (json object) "proposal_id" : "hex", (string) Proposal ID "asset_id" : "hex", (string) Asset ID "issuer_nostr_pubkey" : "str", (string) Issuer Nostr pubkey "created_at" : n, (numeric) Unix timestamp "expires_at" : n, (numeric) Unix timestamp "flow_type" : "str", (string) "public" or "private" "title" : "str", (string) Proposal title (if set) "is_expired" : true|false, (boolean) Whether expired "policy_changes" : "str" (string) Human-readable summary }, ... ] Examples: > bitcoin-cli cosign.list_governance > bitcoin-cli cosign.list_governance "1234567890abcdef..." > bitcoin-cli cosign.list_governance "" true > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "cosign.list_governance", "params": ["", false]}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

cosign.list_governance(asset_id?: string, include_expired?: boolean) → any

Code samples

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

Parameters

NameTypeReq.Description
asset_idstringFilter by asset ID (empty = all)
include_expiredbooleanInclude expired proposals

Result

Type:  any

[ (json array) { (json object) "proposal_id" : "hex", (string) Proposal ID "asset_id" : "hex", (string) Asset ID "issuer_nostr_pubkey" : "str", (string) Issuer Nostr pubkey "created_at" : n, (numeric) Unix timestamp "expires_at" : n, (numeric) Unix timestamp "flow_type" : "str", (string) "public" or "private" "title" : "str", (string) Proposal title (if set) "is_expired" : true|false, (boolean) Whether expired "policy_changes" : "str" (string) Human-readable summary }, ... ]

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

C++ symbol: cosign_list_governance