aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.h
diff options
context:
space:
mode:
authorLeon Klingele <git@leonklingele.de>2018-02-25 17:59:52 +0100
committerLeon Klingele <git@leonklingele.de>2018-03-10 16:28:23 +0100
commit649a1b7ae663888c1ff51ce7b0fa2ed22a719aa4 (patch)
treefbc38bc01570207651808b7bffd112fa37bbad88 /src/wallet/wallet2.h
parentMerge pull request #3261 (diff)
downloadmonero-649a1b7ae663888c1ff51ce7b0fa2ed22a719aa4.tar.xz
wallet2 / simplewallet: Must opt-in to create '.address.txt' files for new wallets
Previously, a file containing the unencrypted Monero address was created by default in the wallet's directory. This file might pose as a privacy risk. The creation of this file is now opt-in and can be enabled by providing --create-address-file
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.h44
1 files changed, 24 insertions, 20 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index 57a61cb9d..9d4a7d75a 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -449,44 +449,48 @@ namespace tools
/*!
* \brief Generates a wallet or restores one.
- * \param wallet_ Name of wallet file
- * \param password Password of wallet file
- * \param multisig_data The multisig restore info and keys
+ * \param wallet_ Name of wallet file
+ * \param password Password of wallet file
+ * \param multisig_data The multisig restore info and keys
+ * \param create_address_file Whether to create an address file
*/
void generate(const std::string& wallet_, const epee::wipeable_string& password,
- const std::string& multisig_data);
+ const std::string& multisig_data, bool create_address_file = false);
/*!
* \brief Generates a wallet or restores one.
- * \param wallet_ Name of wallet file
- * \param password Password of wallet file
- * \param recovery_param If it is a restore, the recovery key
- * \param recover Whether it is a restore
- * \param two_random Whether it is a non-deterministic wallet
- * \return The secret key of the generated wallet
+ * \param wallet_ Name of wallet file
+ * \param password Password of wallet file
+ * \param recovery_param If it is a restore, the recovery key
+ * \param recover Whether it is a restore
+ * \param two_random Whether it is a non-deterministic wallet
+ * \param create_address_file Whether to create an address file
+ * \return The secret key of the generated wallet
*/
crypto::secret_key generate(const std::string& wallet, const epee::wipeable_string& password,
const crypto::secret_key& recovery_param = crypto::secret_key(), bool recover = false,
- bool two_random = false);
+ bool two_random = false, bool create_address_file = false);
/*!
* \brief Creates a wallet from a public address and a spend/view secret key pair.
- * \param wallet_ Name of wallet file
- * \param password Password of wallet file
- * \param viewkey view secret key
- * \param spendkey spend secret key
+ * \param wallet_ Name of wallet file
+ * \param password Password of wallet file
+ * \param viewkey view secret key
+ * \param spendkey spend secret key
+ * \param create_address_file Whether to create an address file
*/
void generate(const std::string& wallet, const epee::wipeable_string& password,
const cryptonote::account_public_address &account_public_address,
- const crypto::secret_key& spendkey, const crypto::secret_key& viewkey);
+ const crypto::secret_key& spendkey, const crypto::secret_key& viewkey, bool create_address_file = false);
/*!
* \brief Creates a watch only wallet from a public address and a view secret key.
- * \param wallet_ Name of wallet file
- * \param password Password of wallet file
- * \param viewkey view secret key
+ * \param wallet_ Name of wallet file
+ * \param password Password of wallet file
+ * \param viewkey view secret key
+ * \param create_address_file Whether to create an address file
*/
void generate(const std::string& wallet, const epee::wipeable_string& password,
const cryptonote::account_public_address &account_public_address,
- const crypto::secret_key& viewkey = crypto::secret_key());
+ const crypto::secret_key& viewkey = crypto::secret_key(), bool create_address_file = false);
/*!
* \brief Restore a wallet hold by an HW.
* \param wallet_ Name of wallet file