diff options
Diffstat (limited to 'src/rpc/misc.cpp')
-rw-r--r-- | src/rpc/misc.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index ba5a3d83d1..2b4ee62c71 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -83,8 +83,9 @@ static UniValue createmultisig(const JSONRPCRequest& request) }, RPCResult{ "{\n" - " \"address\":\"multisigaddress\", (string) The value of the new multisig address.\n" - " \"redeemScript\":\"script\" (string) The string value of the hex-encoded redemption script.\n" + " \"address\" : \"multisigaddress\", (string) The value of the new multisig address.\n" + " \"redeemScript\" : \"script\" (string) The string value of the hex-encoded redemption script.\n" + " \"descriptor\" : \"descriptor\" (string) The descriptor for this multisig\n" "}\n" }, RPCExamples{ @@ -121,9 +122,13 @@ static UniValue createmultisig(const JSONRPCRequest& request) CScript inner; const CTxDestination dest = AddAndGetMultisigDestination(required, pubkeys, output_type, keystore, inner); + // Make the descriptor + std::unique_ptr<Descriptor> descriptor = InferDescriptor(GetScriptForDestination(dest), keystore); + UniValue result(UniValue::VOBJ); result.pushKV("address", EncodeDestination(dest)); result.pushKV("redeemScript", HexStr(inner.begin(), inner.end())); + result.pushKV("descriptor", descriptor->ToString()); return result; } @@ -184,7 +189,7 @@ UniValue deriveaddresses(const JSONRPCRequest& request) {"range", RPCArg::Type::RANGE, RPCArg::Optional::OMITTED_NAMED_ARG, "If a ranged descriptor is used, this specifies the end or the range (in [begin,end] notation) to derive."}, }, RPCResult{ - "[ address ] (array) the derived addresses\n" + "[ address ] (json array) the derived addresses\n" }, RPCExamples{ "First three native segwit receive addresses\n" + @@ -445,13 +450,13 @@ static UniValue getmemoryinfo(const JSONRPCRequest& request) { RPCResult{"mode \"stats\"", "{\n" - " \"locked\": { (json object) Information about locked memory manager\n" - " \"used\": xxxxx, (numeric) Number of bytes used\n" - " \"free\": xxxxx, (numeric) Number of bytes available in current arenas\n" - " \"total\": xxxxxxx, (numeric) Total number of bytes managed\n" - " \"locked\": xxxxxx, (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk.\n" - " \"chunks_used\": xxxxx, (numeric) Number allocated chunks\n" - " \"chunks_free\": xxxxx, (numeric) Number unused chunks\n" + " \"locked\" : { (json object) Information about locked memory manager\n" + " \"used\" : xxxxx, (numeric) Number of bytes used\n" + " \"free\" : xxxxx, (numeric) Number of bytes available in current arenas\n" + " \"total\" : xxxxxxx, (numeric) Total number of bytes managed\n" + " \"locked\" : xxxxxx, (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk.\n" + " \"chunks_used\" : xxxxx, (numeric) Number allocated chunks\n" + " \"chunks_free\" : xxxxx, (numeric) Number unused chunks\n" " }\n" "}\n" }, @@ -524,7 +529,7 @@ UniValue logging(const JSONRPCRequest& request) }, RPCResult{ "{ (json object where keys are the logging categories, and values indicates its status\n" - " \"category\": true|false, (bool) if being debug logged or not. false:inactive, true:active\n" + " \"category\" : true|false, (boolean) if being debug logged or not. false:inactive, true:active\n" " ...\n" "}\n" }, |