aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/wallet2.h')
-rw-r--r--src/wallet/wallet2.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index f9995c2ee..127e70a26 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -162,7 +162,7 @@ namespace tools
//! Just parses variables.
static std::unique_ptr<wallet2> make_dummy(const boost::program_options::variables_map& vm, const std::function<boost::optional<password_container>(const char *, bool)> &password_prompter);
- static bool verify_password(const std::string& keys_file_name, const epee::wipeable_string& password, bool no_spend_key);
+ static bool verify_password(const std::string& keys_file_name, const epee::wipeable_string& password, bool no_spend_key, hw::device &hwdev);
wallet2(bool testnet = false, bool restricted = false);
@@ -487,6 +487,14 @@ namespace tools
const cryptonote::account_public_address &account_public_address,
const crypto::secret_key& viewkey = crypto::secret_key());
/*!
+ * \brief Restore a wallet hold by an HW.
+ * \param wallet_ Name of wallet file
+ * \param password Password of wallet file
+ * \param device_name name of HW to use
+ */
+ void restore(const std::string& wallet_, const epee::wipeable_string& password, const std::string &device_name);
+
+ /*!
* \brief Creates a multisig wallet
* \return empty if done, non empty if we need to send another string
* to other participants
@@ -605,6 +613,7 @@ namespace tools
cryptonote::account_public_address get_subaddress(const cryptonote::subaddress_index& index) const;
cryptonote::account_public_address get_address() const { return get_subaddress({0,0}); }
crypto::public_key get_subaddress_spend_public_key(const cryptonote::subaddress_index& index) const;
+ std::vector<crypto::public_key> get_subaddress_spend_public_keys(uint32_t account, uint32_t begin, uint32_t end) const;
std::string get_subaddress_as_str(const cryptonote::subaddress_index& index) const;
std::string get_address_as_str() const { return get_subaddress_as_str({0, 0}); }
std::string get_integrated_address_as_str(const crypto::hash8& payment_id) const;
@@ -634,6 +643,7 @@ namespace tools
bool multisig(bool *ready = NULL, uint32_t *threshold = NULL, uint32_t *total = NULL) const;
bool has_multisig_partial_key_images() const;
bool get_multisig_seed(std::string& seed, const epee::wipeable_string &passphrase = std::string(), bool raw = true) const;
+ bool key_on_device() const { return m_key_on_device; }
// locked & unlocked balance of given or current subaddress account
uint64_t balance(uint32_t subaddr_index_major) const;
@@ -782,7 +792,8 @@ namespace tools
if (ver < 20)
return;
a & m_subaddresses;
- a & m_subaddresses_inv;
+ std::unordered_map<cryptonote::subaddress_index, crypto::public_key> dummy_subaddresses_inv;
+ a & dummy_subaddresses_inv;
a & m_subaddress_labels;
a & m_additional_tx_keys;
if(ver < 21)
@@ -1089,7 +1100,6 @@ namespace tools
std::unordered_map<crypto::public_key, size_t> m_pub_keys;
cryptonote::account_public_address m_account_public_address;
std::unordered_map<crypto::public_key, cryptonote::subaddress_index> m_subaddresses;
- std::unordered_map<cryptonote::subaddress_index, crypto::public_key> m_subaddresses_inv;
std::vector<std::vector<std::string>> m_subaddress_labels;
std::unordered_map<crypto::hash, std::string> m_tx_notes;
std::unordered_map<std::string, std::string> m_attributes;
@@ -1104,6 +1114,7 @@ namespace tools
boost::mutex m_daemon_rpc_mutex;
i_wallet2_callback* m_callback;
+ bool m_key_on_device;
bool m_testnet;
bool m_restricted;
std::string seed_language; /*!< Language of the mnemonics (seed). */