0diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp
1index 12d165fff7..e9ff8a8040 100644
2--- a/src/rpc/misc.cpp
3+++ b/src/rpc/misc.cpp
4@@ -145,30 +145,29 @@ static UniValue createmultisig(const JSONRPCRequest& request)
5
6 UniValue deriveaddresses(const JSONRPCRequest& request)
7 {
8- if (request.fHelp || request.params.empty() || request.params.size() > 3)
9+ if (request.fHelp || request.params.empty() || request.params.size() > 3) {
10 throw std::runtime_error(
11- RPCHelpMan{"deriveaddresses", {
12- "\nDerives one or more addresses corresponding to an output descriptor.\n"
13- "Examples of output descriptors are:\n"
14- " pkh(<pubkey>) P2PKH outputs for the given pubkey\n"
15- " wpkh(<pubkey>) Native segwit P2PKH outputs for the given pubkey\n"
16- " sh(multi(<n>,<pubkey>,<pubkey>,...)) P2SH-multisig outputs for the given threshold and pubkeys\n"
17- " raw(<hex script>) Outputs whose scriptPubKey equals the specified hex scripts\n"
18- "\nIn the above, <pubkey> either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one\n"
19- "or more path elements separated by \"/\", where \"h\" represents a hardened child key.\n"
20- "For more information on output descriptors, see the documentation in the doc/descriptors.md file.\n"
21- }, {
22- {"descriptor", RPCArg::Type::STR, /* opt */ false, /* default_val */ "", "The descriptor."},
23- {"begin", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "", "If a ranged descriptor is used, this specifies the beginning of the range to import."},
24- {"end", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "", "If a ranged descriptor is used, this specifies the end of the range to import."}
25- }}.ToString() +
26- "\nResult:\n"
27- "[ address ] (array) the derived addresses\n"
28- "\nExamples:\n"
29- "\nFirst three native segwit receive addresses\n"
30- + HelpExampleCli("deriveaddresses", "\"wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)\" 0 2") +
31- ""
32- );
33+ RPCHelpMan{"deriveaddresses",
34+ {"\nDerives one or more addresses corresponding to an output descriptor.\n"
35+ "Examples of output descriptors are:\n"
36+ " pkh(<pubkey>) P2PKH outputs for the given pubkey\n"
37+ " wpkh(<pubkey>) Native segwit P2PKH outputs for the given pubkey\n"
38+ " sh(multi(<n>,<pubkey>,<pubkey>,...)) P2SH-multisig outputs for the given threshold and pubkeys\n"
39+ " raw(<hex script>) Outputs whose scriptPubKey equals the specified hex scripts\n"
40+ "\nIn the above, <pubkey> either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one\n"
41+ "or more path elements separated by \"/\", where \"h\" represents a hardened child key.\n"
42+ "For more information on output descriptors, see the documentation in the doc/descriptors.md file.\n"},
43+ {
44+ {"descriptor", RPCArg::Type::STR, /* opt */ false, /* default_val */ "", "The descriptor."},
45+ {"begin", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "", "If a ranged descriptor is used, this specifies the beginning of the range to import."},
46+ {"end", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "", "If a ranged descriptor is used, this specifies the end of the range to import."},
47+ },
48+ RPCResult{
49+ "[ address ] (array) the derived addresses\n"},
50+ RPCExamples{
51+ "\nFirst three native segwit receive addresses\n" + HelpExampleCli("deriveaddresses", "\"wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)\" 0 2")}}
52+ .ToString());
53+ }
54
55 RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VNUM, UniValue::VNUM});
56 const std::string desc_str = request.params[0].get_str();