|
Bitcoin Core
21.99.0
P2P Digital Currency
|
Go to the documentation of this file.
14 #ifdef ENABLE_EXTERNAL_SIGNER
20 "Returns a list of external signers from -signer.",
35 const std::string command =
gArgs.
GetArg(
"-signer",
"");
40 std::vector<ExternalSigner> signers;
44 signer_res.
pushKV(
"fingerprint", signer.m_fingerprint);
45 signer_res.
pushKV(
"name", signer.m_name);
52 result.
pushKV(
"signers", signers_res);
61 "signerdisplayaddress",
62 "Display address on an external signer for verification.\n",
87 result.
pushKV(
"address", request.params[0].get_str());
108 #endif // ENABLE_EXTERNAL_SIGNER
const UniValue NullUniValue
std::string GetChainName() const
Returns the appropriate chain name from the program arguments.
static RPCHelpMan signerdisplayaddress()
bool pushKV(const std::string &key, const UniValue &val)
Span< const CRPCCommand > GetSignerRPCCommands()
A Span is an object that can refer to a contiguous sequence of objects.
bool IsValidDestination(const CTxDestination &dest)
Check whether a CTxDestination is a CNoDestination.
std::shared_ptr< CWallet > GetWalletForJSONRPCRequest(const JSONRPCRequest &request)
Figures out what wallet, if any, to use for a JSONRPCRequest.
static RPCHelpMan enumeratesigners()
@ STR_HEX
Special string with only hex chars.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
@ RPC_WALLET_ERROR
Wallet errors.
CTxDestination DecodeDestination(const std::string &str, std::string &error_msg)
Enables interaction with an external signing device or service, such as a hardware wallet.
@ RPC_INVALID_ADDRESS_OR_KEY
Invalid address or key.
static bool Enumerate(const std::string &command, std::vector< ExternalSigner > &signers, std::string chain, bool ignore_errors=false)
Obtain a list of signers.
UniValue JSONRPCError(int code, const std::string &message)
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
bool push_back(const UniValue &val)
std::variant< CNoDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessUnknown > CTxDestination
A txout script template with a specific destination.
constexpr Span< A > MakeSpan(A(&a)[N])
MakeSpan for arrays:
bool DisplayAddress(const CTxDestination &dest) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
Display address on an external signer.