mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-03 22:53:19 +02:00
Output psbt version in decodepsbt
This commit is contained in:
@@ -1075,6 +1075,7 @@ static RPCHelpMan decodepsbt()
|
||||
{
|
||||
{RPCResult::Type::ELISION, "", "The layout is the same as the output of decoderawtransaction."},
|
||||
}},
|
||||
{RPCResult::Type::NUM, "psbt_version", "The PSBT version number. Not to be confused with the unsigned transaction version"},
|
||||
{RPCResult::Type::OBJ_DYN, "unknown", "The unknown global fields",
|
||||
{
|
||||
{RPCResult::Type::STR_HEX, "key", "(key-value pair) An unknown key-value pair"},
|
||||
@@ -1194,6 +1195,9 @@ static RPCHelpMan decodepsbt()
|
||||
TxToUniv(CTransaction(*psbtx.tx), uint256(), tx_univ, false);
|
||||
result.pushKV("tx", tx_univ);
|
||||
|
||||
// PSBT version
|
||||
result.pushKV("psbt_version", static_cast<uint64_t>(psbtx.GetVersion()));
|
||||
|
||||
// Unknown data
|
||||
UniValue unknowns(UniValue::VOBJ);
|
||||
for (auto entry : psbtx.unknown) {
|
||||
|
Reference in New Issue
Block a user