mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-13 01:17:03 +02:00
rpc: add help for enumeratesigners and walletdisplayaddress
This commit is contained in:
@ -13,8 +13,7 @@
|
|||||||
|
|
||||||
static RPCHelpMan enumeratesigners()
|
static RPCHelpMan enumeratesigners()
|
||||||
{
|
{
|
||||||
return RPCHelpMan{
|
return RPCHelpMan{"enumeratesigners",
|
||||||
"enumeratesigners",
|
|
||||||
"Returns a list of external signers from -signer.",
|
"Returns a list of external signers from -signer.",
|
||||||
{},
|
{},
|
||||||
RPCResult{
|
RPCResult{
|
||||||
@ -28,8 +27,12 @@ static RPCHelpMan enumeratesigners()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RPCExamples{""},
|
RPCExamples{
|
||||||
[](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
|
HelpExampleCli("enumeratesigners", "")
|
||||||
|
+ HelpExampleRpc("enumeratesigners", "")
|
||||||
|
},
|
||||||
|
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||||
|
{
|
||||||
const std::string command = gArgs.GetArg("-signer", "");
|
const std::string command = gArgs.GetArg("-signer", "");
|
||||||
if (command == "") throw JSONRPCError(RPC_MISC_ERROR, "Error: restart bitcoind with -signer=<cmd>");
|
if (command == "") throw JSONRPCError(RPC_MISC_ERROR, "Error: restart bitcoind with -signer=<cmd>");
|
||||||
std::string chain = gArgs.GetChainName();
|
std::string chain = gArgs.GetChainName();
|
||||||
|
@ -4529,9 +4529,8 @@ static RPCHelpMan upgradewallet()
|
|||||||
#ifdef ENABLE_EXTERNAL_SIGNER
|
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||||
static RPCHelpMan walletdisplayaddress()
|
static RPCHelpMan walletdisplayaddress()
|
||||||
{
|
{
|
||||||
return RPCHelpMan{
|
return RPCHelpMan{"walletdisplayaddress",
|
||||||
"walletdisplayaddress",
|
"Display address on an external signer for verification.",
|
||||||
"Display address on an external signer for verification.\n",
|
|
||||||
{
|
{
|
||||||
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, /* default_val */ "", "bitcoin address to display"},
|
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, /* default_val */ "", "bitcoin address to display"},
|
||||||
},
|
},
|
||||||
@ -4542,7 +4541,8 @@ static RPCHelpMan walletdisplayaddress()
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
RPCExamples{""},
|
RPCExamples{""},
|
||||||
[](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
|
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||||
|
{
|
||||||
std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
|
std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
|
||||||
if (!wallet) return NullUniValue;
|
if (!wallet) return NullUniValue;
|
||||||
CWallet* const pwallet = wallet.get();
|
CWallet* const pwallet = wallet.get();
|
||||||
|
Reference in New Issue
Block a user