@@ -1076,6 +1076,16 @@ static RPCHelpMan decodepsbt()
1076
1076
{RPCResult::Type::ELISION, " " , " The layout is the same as the output of decoderawtransaction." },
1077
1077
}},
1078
1078
{RPCResult::Type::NUM, " psbt_version" , " The PSBT version number. Not to be confused with the unsigned transaction version" },
1079
+ {RPCResult::Type::ARR, " proprietary" , " The global proprietary map" ,
1080
+ {
1081
+ {RPCResult::Type::OBJ, " " , " " ,
1082
+ {
1083
+ {RPCResult::Type::STR_HEX, " identifier" , " The hex string for the proprietary identifier" },
1084
+ {RPCResult::Type::NUM, " subtype" , " The number for the subtype" },
1085
+ {RPCResult::Type::STR_HEX, " key" , " The hex for the key" },
1086
+ {RPCResult::Type::STR_HEX, " value" , " The hex for the value" },
1087
+ }},
1088
+ }},
1079
1089
{RPCResult::Type::OBJ_DYN, " unknown" , " The unknown global fields" ,
1080
1090
{
1081
1091
{RPCResult::Type::STR_HEX, " key" , " (key-value pair) An unknown key-value pair" },
@@ -1138,6 +1148,16 @@ static RPCHelpMan decodepsbt()
1138
1148
{
1139
1149
{RPCResult::Type::STR_HEX, " key" , " (key-value pair) An unknown key-value pair" },
1140
1150
}},
1151
+ {RPCResult::Type::ARR, " proprietary" , " The input proprietary map" ,
1152
+ {
1153
+ {RPCResult::Type::OBJ, " " , " " ,
1154
+ {
1155
+ {RPCResult::Type::STR_HEX, " identifier" , " The hex string for the proprietary identifier" },
1156
+ {RPCResult::Type::NUM, " subtype" , " The number for the subtype" },
1157
+ {RPCResult::Type::STR_HEX, " key" , " The hex for the key" },
1158
+ {RPCResult::Type::STR_HEX, " value" , " The hex for the value" },
1159
+ }},
1160
+ }},
1141
1161
}},
1142
1162
}},
1143
1163
{RPCResult::Type::ARR, " outputs" , " " ,
@@ -1169,6 +1189,16 @@ static RPCHelpMan decodepsbt()
1169
1189
{
1170
1190
{RPCResult::Type::STR_HEX, " key" , " (key-value pair) An unknown key-value pair" },
1171
1191
}},
1192
+ {RPCResult::Type::ARR, " proprietary" , " The output proprietary map" ,
1193
+ {
1194
+ {RPCResult::Type::OBJ, " " , " " ,
1195
+ {
1196
+ {RPCResult::Type::STR_HEX, " identifier" , " The hex string for the proprietary identifier" },
1197
+ {RPCResult::Type::NUM, " subtype" , " The number for the subtype" },
1198
+ {RPCResult::Type::STR_HEX, " key" , " The hex for the key" },
1199
+ {RPCResult::Type::STR_HEX, " value" , " The hex for the value" },
1200
+ }},
1201
+ }},
1172
1202
}},
1173
1203
}},
1174
1204
{RPCResult::Type::STR_AMOUNT, " fee" , /* optional=*/ true , " The transaction fee paid if all UTXOs slots in the PSBT have been filled." },
@@ -1198,6 +1228,18 @@ static RPCHelpMan decodepsbt()
1198
1228
// PSBT version
1199
1229
result.pushKV (" psbt_version" , static_cast <uint64_t >(psbtx.GetVersion ()));
1200
1230
1231
+ // Proprietary
1232
+ UniValue proprietary (UniValue::VARR);
1233
+ for (const auto & entry : psbtx.m_proprietary ) {
1234
+ UniValue this_prop (UniValue::VOBJ);
1235
+ this_prop.pushKV (" identifier" , HexStr (entry.identifier ));
1236
+ this_prop.pushKV (" subtype" , entry.subtype );
1237
+ this_prop.pushKV (" key" , HexStr (entry.key ));
1238
+ this_prop.pushKV (" value" , HexStr (entry.value ));
1239
+ proprietary.push_back (this_prop);
1240
+ }
1241
+ result.pushKV (" proprietary" , proprietary);
1242
+
1201
1243
// Unknown data
1202
1244
UniValue unknowns (UniValue::VOBJ);
1203
1245
for (auto entry : psbtx.unknown ) {
@@ -1304,6 +1346,20 @@ static RPCHelpMan decodepsbt()
1304
1346
in.pushKV (" final_scriptwitness" , txinwitness);
1305
1347
}
1306
1348
1349
+ // Proprietary
1350
+ if (!input.m_proprietary .empty ()) {
1351
+ UniValue proprietary (UniValue::VARR);
1352
+ for (const auto & entry : input.m_proprietary ) {
1353
+ UniValue this_prop (UniValue::VOBJ);
1354
+ this_prop.pushKV (" identifier" , HexStr (entry.identifier ));
1355
+ this_prop.pushKV (" subtype" , entry.subtype );
1356
+ this_prop.pushKV (" key" , HexStr (entry.key ));
1357
+ this_prop.pushKV (" value" , HexStr (entry.value ));
1358
+ proprietary.push_back (this_prop);
1359
+ }
1360
+ in.pushKV (" proprietary" , proprietary);
1361
+ }
1362
+
1307
1363
// Unknown data
1308
1364
if (input.unknown .size () > 0 ) {
1309
1365
UniValue unknowns (UniValue::VOBJ);
@@ -1348,6 +1404,20 @@ static RPCHelpMan decodepsbt()
1348
1404
out.pushKV (" bip32_derivs" , keypaths);
1349
1405
}
1350
1406
1407
+ // Proprietary
1408
+ if (!output.m_proprietary .empty ()) {
1409
+ UniValue proprietary (UniValue::VARR);
1410
+ for (const auto & entry : output.m_proprietary ) {
1411
+ UniValue this_prop (UniValue::VOBJ);
1412
+ this_prop.pushKV (" identifier" , HexStr (entry.identifier ));
1413
+ this_prop.pushKV (" subtype" , entry.subtype );
1414
+ this_prop.pushKV (" key" , HexStr (entry.key ));
1415
+ this_prop.pushKV (" value" , HexStr (entry.value ));
1416
+ proprietary.push_back (this_prop);
1417
+ }
1418
+ out.pushKV (" proprietary" , proprietary);
1419
+ }
1420
+
1351
1421
// Unknown data
1352
1422
if (output.unknown .size () > 0 ) {
1353
1423
UniValue unknowns (UniValue::VOBJ);
0 commit comments