rpc: add help for enumeratesigners and walletdisplayaddress

pull/21467/head
Sjors Provoost 4 years ago
parent b0db187e5b
commit 88d4d5ff2f
No known key found for this signature in database
GPG Key ID: 57FF9BDBCC301009

@ -13,8 +13,7 @@
static RPCHelpMan enumeratesigners()
{
return RPCHelpMan{
"enumeratesigners",
return RPCHelpMan{"enumeratesigners",
"Returns a list of external signers from -signer.",
{},
RPCResult{
@ -28,8 +27,12 @@ static RPCHelpMan enumeratesigners()
}
}
},
RPCExamples{""},
[](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
RPCExamples{
HelpExampleCli("enumeratesigners", "")
+ HelpExampleRpc("enumeratesigners", "")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
const std::string command = gArgs.GetArg("-signer", "");
if (command == "") throw JSONRPCError(RPC_MISC_ERROR, "Error: restart bitcoind with -signer=<cmd>");
std::string chain = gArgs.GetChainName();

@ -4529,9 +4529,8 @@ static RPCHelpMan upgradewallet()
#ifdef ENABLE_EXTERNAL_SIGNER
static RPCHelpMan walletdisplayaddress()
{
return RPCHelpMan{
"walletdisplayaddress",
"Display address on an external signer for verification.\n",
return RPCHelpMan{"walletdisplayaddress",
"Display address on an external signer for verification.",
{
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, /* default_val */ "", "bitcoin address to display"},
},
@ -4542,7 +4541,8 @@ static RPCHelpMan walletdisplayaddress()
}
},
RPCExamples{""},
[](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
if (!wallet) return NullUniValue;
CWallet* const pwallet = wallet.get();

Loading…
Cancel
Save