aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet2_api.h
diff options
context:
space:
mode:
authorm2049r <m2049r@monerujo.io>2018-08-16 10:31:48 +0200
committerm2049r <m2049r@monerujo.io>2018-09-19 18:25:38 +0200
commitbce474be7d9cfa80d9f0970047bfd508db60424f (patch)
tree438aa4f3d4e2e5a2f8d56ef8747b522b44013e76 /src/wallet/api/wallet2_api.h
parentMerge pull request #4391 (diff)
downloadmonero-bce474be7d9cfa80d9f0970047bfd508db60424f.tar.xz
query backing device
Diffstat (limited to '')
-rw-r--r--src/wallet/api/wallet2_api.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h
index 933916076..e0d491705 100644
--- a/src/wallet/api/wallet2_api.h
+++ b/src/wallet/api/wallet2_api.h
@@ -373,6 +373,10 @@ struct WalletListener
*/
struct Wallet
{
+ enum Device {
+ Device_Software = 0,
+ Device_Ledger = 1
+ };
enum Status {
Status_Ok,
@@ -911,6 +915,12 @@ struct Wallet
virtual bool unlockKeysFile() = 0;
//! returns true if the keys file is locked
virtual bool isKeysFileLocked() = 0;
+
+ /*!
+ * \brief Queries backing device for wallet keys
+ * \return Device they are on
+ */
+ virtual Device getDeviceType() const = 0;
};
/**
@@ -1097,6 +1107,18 @@ struct WalletManager
virtual bool verifyWalletPassword(const std::string &keys_file_name, const std::string &password, bool no_spend_key, uint64_t kdf_rounds = 1) const = 0;
/*!
+ * \brief determine the key storage for the specified wallet file
+ * \param device_type (OUT) wallet backend as enumerated in Wallet::Device
+ * \param keys_file_name Keys file to verify password for
+ * \param password Password to verify
+ * \return true if password correct, else false
+ *
+ * for verification only - determines key storage hardware
+ *
+ */
+ virtual bool queryWalletDevice(Wallet::Device& device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds = 1) const = 0;
+
+ /*!
* \brief findWallets - searches for the wallet files by given path name recursively
* \param path - starting point to search
* \return - list of strings with found wallets (absolute paths);