MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetExternalSigner

Method GetExternalSigner

src/wallet/external_signer_scriptpubkeyman.cpp:55–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55 util::Result<ExternalSigner> ExternalSignerScriptPubKeyMan::GetExternalSigner() {
56 const std::string command = gArgs.GetArg("-signer", "");
57 if (command == "") return util::Error{Untranslated("restart bitcoind with -signer=<cmd>")};
58 std::vector<ExternalSigner> signers;
59 ExternalSigner::Enumerate(command, signers, Params().GetChainTypeString());
60 if (signers.empty()) return util::Error{Untranslated("No external signers found")};
61 // TODO: add fingerprint argument instead of failing in case of multiple signers.
62 if (signers.size() > 1) return util::Error{Untranslated("More than one external signer found. Please connect only one at a time.")};
63 return signers[0];
64}
65
66util::Result<void> ExternalSignerScriptPubKeyMan::DisplayAddress(const CTxDestination& dest, const ExternalSigner &signer) const
67{

Callers

nothing calls this directly

Calls 6

UntranslatedFunction · 0.85
GetArgMethod · 0.80
ParamsClass · 0.50
GetChainTypeStringMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected