/build/rpc / cosign / governance
cosign.process_governance_dms
cosign.process_governance_dms ( since auto_approve ) Process incoming governance DMs (access requests, ballots, receipts). Issuer-side: Check for holder access requests and verify ownership proofs. Holder-side: Check for proposal responses and ballot receipts. Arguments: 1. since (numeric, optional) Fetch DMs since this timestamp (default: last hour) 2. auto_approve (boolean, optional, default=false) Automatically send responses to verified holders (default: false, manual approval required) Result: { (json object) "access_requests" : [ (json array) Holder requests for private proposals { (json object) "proposal_id" : "str", (string) Proposal ID "asset_id" : "str", (string) Asset ID "holder_nostr_pubkey" : "str", (string) Holder's nostr pubkey "utxo_ref" : "str", (string) UTXO reference (txid:vout) "asset_units" : n, (numeric) Asset units in UTXO "ownership_verified" : true|false, (boolean) Whether BIP-322 signature verified "from_pubkey" : "str" (string) Sender's nostr pubkey }, ... ], "proposal_responses" : [ (json array) Issuer responses with full proposal { (json object) "proposal_id" : "str", (string) Proposal ID "icu_text" : "str", (string) Full ICU governance text "template_psbt" : "str" (string) Template PSBT for voting }, ... ], "ballot_dms" : [ (json array) Private ballot submissions { (json object) "proposal_id" : "str", (string) Proposal ID "signed_psbt" : "str", (string) Signed ballot PSBT "ballot_units" : n (numeric) Voting units }, ... ], "ballot_receipts" : [ (json array) Issuer ballot receipts { (json object) "ballot_id" : "str", (string) Ballot ID "units_accepted" : n, (numeric) Units accepted "quorum_reached" : true|false (boolean) Whether quorum reached }, ... ] } Examples: > bitcoin-cli cosign.process_governance_dms > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "cosign.process_governance_dms", "params": []}' -H 'content-type: application/json' http://127.0.0.1:8332/
Signature
cosign.process_governance_dms(since?: number, auto_approve?: boolean) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"cosign.process_governance_dms","params":[0,false]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| since | number | — | Fetch DMs since this timestamp (default: last hour) |
| auto_approve | boolean | — | Automatically send responses to verified holders (default: false, manual approval required) |
Result
Type: any
{ (json object) "access_requests" : [ (json array) Holder requests for private proposals { (json object) "proposal_id" : "str", (string) Proposal ID "asset_id" : "str", (string) Asset ID "holder_nostr_pubkey" : "str", (string) Holder's nostr pubkey "utxo_ref" : "str", (string) UTXO reference (txid:vout) "asset_units" : n, (numeric) Asset units in UTXO "ownership_verified" : true|false, (boolean) Whether BIP-322 signature verified "from_pubkey" : "str" (string) Sender's nostr pubkey }, ... ], "proposal_responses" : [ (json array) Issuer responses with full proposal { (json object) "proposal_id" : "str", (string) Proposal ID "icu_text" : "str", (string) Full ICU governance text "template_psbt" : "str" (string) Template PSBT for voting }, ... ], "ballot_dms" : [ (json array) Private ballot submissions { (json object) "proposal_id" : "str", (string) Proposal ID "signed_psbt" : "str", (string) Signed ballot PSBT "ballot_units" : n (numeric) Voting units }, ... ], "ballot_receipts" : [ (json array) Issuer ballot receipts { (json object) "ballot_id" : "str", (string) Ballot ID "units_accepted" : n, (numeric) Units accepted "quorum_reached" : true|false (boolean) Whether quorum reached }, ... ] }
Source: services/core-node/bcore/src/rpc/cosign.cpp:2984
C++ symbol: cosign_process_governance_dms