mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
rpc: Exclude descriptor when address is excluded
This commit is contained in:
parent
d6f225f5c9
commit
faf37c217a
2 changed files with 4 additions and 1 deletions
|
@ -153,7 +153,9 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool include
|
|||
CTxDestination address;
|
||||
|
||||
out.pushKV("asm", ScriptToAsmStr(scriptPubKey));
|
||||
out.pushKV("desc", InferDescriptor(scriptPubKey, DUMMY_SIGNING_PROVIDER)->ToString());
|
||||
if (include_address) {
|
||||
out.pushKV("desc", InferDescriptor(scriptPubKey, DUMMY_SIGNING_PROVIDER)->ToString());
|
||||
}
|
||||
if (include_hex) out.pushKV("hex", HexStr(scriptPubKey));
|
||||
|
||||
std::vector<std::vector<unsigned char>> solns;
|
||||
|
|
|
@ -1121,6 +1121,7 @@ static RPCHelpMan decodepsbt()
|
|||
{RPCResult::Type::OBJ, "scriptPubKey", "",
|
||||
{
|
||||
{RPCResult::Type::STR, "asm", "The asm"},
|
||||
{RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
|
||||
{RPCResult::Type::STR_HEX, "hex", "The hex"},
|
||||
{RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
|
||||
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
|
||||
|
|
Loading…
Add table
Reference in a new issue