aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/external_signer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/external_signer.h')
-rw-r--r--src/wallet/external_signer.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/wallet/external_signer.h b/src/wallet/external_signer.h
index 08fb0c9f39..9d32fe1e04 100644
--- a/src/wallet/external_signer.h
+++ b/src/wallet/external_signer.h
@@ -8,6 +8,7 @@
#include <stdexcept>
#include <string>
#include <univalue.h>
+#include <util/system.h>
class ExternalSignerException : public std::runtime_error {
public:
@@ -25,10 +26,30 @@ private:
public:
//! @param[in] command the command which handles interaction with the external signer
//! @param[in] fingerprint master key fingerprint of the signer
- ExternalSigner(const std::string& command, const std::string& fingerprint);
+ //! @param[in] chain "main", "test", "regtest" or "signet"
+ //! @param[in] name device name
+ ExternalSigner(const std::string& command, const std::string& fingerprint, std::string chain, std::string name);
//! Master key fingerprint of the signer
std::string m_fingerprint;
+
+ //! Bitcoin mainnet, testnet, etc
+ std::string m_chain;
+
+ //! Name of signer
+ std::string m_name;
+
+ const std::string NetworkArg() const;
+
+#ifdef ENABLE_EXTERNAL_SIGNER
+ //! Obtain a list of signers. Calls `<command> enumerate`.
+ //! @param[in] command the command which handles interaction with the external signer
+ //! @param[in,out] signers vector to which new signers (with a unique master key fingerprint) are added
+ //! @param chain "main", "test", "regtest" or "signet"
+ //! @param[out] success Boolean
+ static bool Enumerate(const std::string& command, std::vector<ExternalSigner>& signers, std::string chain, bool ignore_errors = false);
+
+#endif
};
#endif // BITCOIN_WALLET_EXTERNAL_SIGNER_H