Language

Choose a language

/build/rpc / assets / governance_rotation

merge_rotation

merge_rotation "template_psbt" ["",...] Merge multiple ballot PSBTs into a single rotation transaction. Validates pairing (input i → output i) and computes total ballot units. Enforces Δ=0 (no mint/burn during rotation). Arguments: 1. template_psbt (string, required) Base64-encoded template PSBT 2. ballot_psbts (json array, required) Array of ballot PSBTs [ "", (string) Base64-encoded ballot PSBT ... ] Result: { (json object) "psbt" : "str", (string) Base64-encoded merged PSBT "total_ballot_units" : n, (numeric) Total ballot units from all ballots "asset_delta" : n, (numeric) Asset delta (should be 0 for valid rotation) "quorum_met" : true|false, (boolean) Whether required quorum is met (informational) "required_units" : n, (numeric) Minimum ballot units needed for quorum "policy_quorum_bps" : n, (numeric) Governance quorum threshold "settled_supply" : n (numeric) Current settled supply (issued - burned) } Examples: > bitcoin-cli merge_rotation "cHNidP8..." '["cHNidP8...","cHNidP8..."]'

Signature

merge_rotation(template_psbt: string, ballot_psbts: array) → any

Code samples

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

Parameters

NameTypeReq.Description
template_psbtstringyesBase64-encoded template PSBT
ballot_psbtsany[]yesArray of ballot PSBTs [ "", (string) Base64-encoded ballot PSBT ... ]

Result

Type:  any

{ (json object) "psbt" : "str", (string) Base64-encoded merged PSBT "total_ballot_units" : n, (numeric) Total ballot units from all ballots "asset_delta" : n, (numeric) Asset delta (should be 0 for valid rotation) "quorum_met" : true|false, (boolean) Whether required quorum is met (informational) "required_units" : n, (numeric) Minimum ballot units needed for quorum "policy_quorum_bps" : n, (numeric) Governance quorum threshold "settled_supply" : n (numeric) Current settled supply (issued - burned) }

Source: services/core-node/bcore/src/wallet/rpc/assets.cpp:7622

C++ symbol: merge_rotation