rpc: expand decodepsbt output script with explicit fields
What changed, and why it matters
This commit is a documentation-only change in the Bitcoin Core RPC help output. It replaces a vague placeholder description for the 'script' field inside decodepsbt with an explicit, structured description reused from another part of the code. There is no code behavior change, no bug fix, and no security relevance.
No action required. This is a non-security documentation improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies a single line in src/rpc/rawtransaction.cpp within the DecodePSBTOutputs() RPC result documentation. It swaps an ELISION placeholder for ElideGroup(ScriptPubKeyDoc(), …), which expands the help text to list the actual sub-fields of the scriptPubKey object. ScriptPubKeyDoc() is already used by ScriptToUniv(), so this only aligns the PSBT documentation with the existing decoderawtransaction output format. No runtime logic is altered.
Changed components
src/rpc/rawtransaction.cppdecodepsbt RPC help documentationInspect captured patch +1 / −1
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 618277d7..31a877b8 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -979,7 +979,7 @@ const RPCResult& DecodePSBTOutputs()
}},
{RPCResult::Type::NUM, "amount", /* optional=*/ true, "The amount (nValue) for this output"},
{RPCResult::Type::OBJ, "script", /* optional=*/ true, "The output script (scriptPubKey) for this output",
- {{RPCResult::Type::ELISION, "", "The layout is the same as the output of scriptPubKeys in decoderawtransaction."}},
+ ElideGroup(ScriptPubKeyDoc(), "The layout is the same as the output of scriptPubKeys in decoderawtransaction."),
},
{RPCResult::Type::STR_HEX, "taproot_internal_key", /*optional=*/ true, "The hex-encoded Taproot x-only internal key"},
{RPCResult::Type::ARR, "taproot_tree", /*optional=*/ true, "The tuples that make up the Taproot tree, in depth first search order",
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.