15 #ifdef ENABLE_EXTERNAL_SIGNER 20 "Returns a list of external signers from -signer.",
39 const std::string command =
gArgs.
GetArg(
"-signer",
"");
44 std::vector<ExternalSigner> signers;
48 signer_res.
pushKV(
"fingerprint", signer.m_fingerprint);
49 signer_res.
pushKV(
"name", signer.m_name);
52 }
catch (
const std::exception& e) {
56 result.
pushKV(
"signers", signers_res);
71 for (
const auto& c : commands) {
76 #endif // ENABLE_EXTERNAL_SIGNER Enables interaction with an external signing device or service, such as a hardware wallet...
void appendCommand(const std::string &name, const CRPCCommand *pcmd)
Appends a CRPCCommand to the dispatch table.
static RPCHelpMan enumeratesigners()
UniValue JSONRPCError(int code, const std::string &message)
bool push_back(const UniValue &val)
Special string with only hex chars.
std::string HelpExampleRpc(const std::string &methodname, const std::string &args)
General application defined errors.
bool pushKV(const std::string &key, const UniValue &val)
static bool Enumerate(const std::string &command, std::vector< ExternalSigner > &signers, const std::string chain)
Obtain a list of signers.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
std::string HelpExampleCli(const std::string &methodname, const std::string &args)
std::string GetChainName() const
Returns the appropriate chain name from the program arguments.
void RegisterSignerRPCCommands(CRPCTable &t)
Register raw transaction RPC commands.