Language

Choose a language

/build/rpc / cosign / governance

cosign.request_private_proposal

cosign.request_private_proposal "proposal_id" "asset_id" "issuer_nostr_pubkey" "holder_nostr_pubkey" {"utxo_ref":"str","address":"str","message":"str","signature":"str","asset_units":n} Request access to a private governance proposal via encrypted DM. Holder proves ownership of asset UTXOs via BIP-322 signature, and issuer responds with full proposal details (ICU text, template PSBT) via DM. Arguments: 1. proposal_id (string, required) Proposal ID 2. asset_id (string, required) Asset ID 3. issuer_nostr_pubkey (string, required) Issuer's Nostr public key 4. holder_nostr_pubkey (string, required) Holder's Nostr public key 5. ownership_proof (json object, required) BIP-322 ownership proof { "utxo_ref": "str", (string, required) UTXO reference (txid:vout) "address": "str", (string, required) Bitcoin address "message": "str", (string, required) Message: TENSORCASH_HOLDER:{proposal_id}:{holder_pubkey} "signature": "str", (string, required) BIP-322 signature "asset_units": n, (numeric, required) Asset units in UTXO } Result: { (json object) "session_id" : "str", (string) Governance session ID "status" : "str", (string) Request status "message" : "str" (string) Status message } Examples: > bitcoin-cli cosign.request_private_proposal "a1b2c3..." "def456..." "789abc..." "{\"utxo_ref\":\"txid:0\", ...}" > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "cosign.request_private_proposal", "params": ["a1b2c3...", "def456...", "789abc...", {...}]}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

cosign.request_private_proposal(proposal_id: string, asset_id: string, issuer_nostr_pubkey: string, holder_nostr_pubkey: string, ownership_proof: object) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"cosign.request_private_proposal","params":["\"<proposal_id>\"","\"<asset_id>\"","\"<issuer_nostr_pubkey>\"","\"<holder_nostr_pubkey>\"",{}]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
proposal_idstringyesProposal ID
asset_idstringyesAsset ID
issuer_nostr_pubkeystringyesIssuer's Nostr public key
holder_nostr_pubkeystringyesHolder's Nostr public key
ownership_proofobjectyesBIP-322 ownership proof { "utxo_ref": "str", (string, required) UTXO reference (txid:vout) "address": "str", (string, required) Bitcoin address "message": "str", (string, required) Message: TENSORCASH_HOLDER:{proposal_id}:{holder_pubkey} "signature": "str", (string, required) BIP-322 signature "asset_units": n, (numeric, required) Asset units in UTXO }

Result

Type:  any

{ (json object) "session_id" : "str", (string) Governance session ID "status" : "str", (string) Request status "message" : "str" (string) Status message }

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

C++ symbol: cosign_request_private_proposal