mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Output psbt version in decodepsbt
This commit is contained in:
parent
df84fa99c5
commit
10ba0b593d
1 changed files with 4 additions and 0 deletions
|
@ -1075,6 +1075,7 @@ static RPCHelpMan decodepsbt()
|
||||||
{
|
{
|
||||||
{RPCResult::Type::ELISION, "", "The layout is the same as the output of decoderawtransaction."},
|
{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::OBJ_DYN, "unknown", "The unknown global fields",
|
||||||
{
|
{
|
||||||
{RPCResult::Type::STR_HEX, "key", "(key-value pair) An unknown key-value pair"},
|
{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);
|
TxToUniv(CTransaction(*psbtx.tx), uint256(), tx_univ, false);
|
||||||
result.pushKV("tx", tx_univ);
|
result.pushKV("tx", tx_univ);
|
||||||
|
|
||||||
|
// PSBT version
|
||||||
|
result.pushKV("psbt_version", static_cast<uint64_t>(psbtx.GetVersion()));
|
||||||
|
|
||||||
// Unknown data
|
// Unknown data
|
||||||
UniValue unknowns(UniValue::VOBJ);
|
UniValue unknowns(UniValue::VOBJ);
|
||||||
for (auto entry : psbtx.unknown) {
|
for (auto entry : psbtx.unknown) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue