From 4f382b383005d09f6056371d0fecdc8b6ce37a08 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Wed, 4 Jun 2014 18:59:47 -0400 Subject: most functions prototyped/modified for wallet recovery --- src/simplewallet/simplewallet.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/simplewallet/simplewallet.h') diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index 3dcaaeaa0..d1f9fe98b 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -13,6 +13,7 @@ #include "wallet/wallet2.h" #include "console_handler.h" #include "password_container.h" +#include "crypto/crypto.h" // for definition of crypto::secret_key namespace cryptonote @@ -39,7 +40,9 @@ namespace cryptonote bool run_console_handler(); - bool new_wallet(const std::string &wallet_file, const std::string& password); + bool parse_electrum(); + + bool new_wallet(const std::string &wallet_file, const std::string& password, const crypto::secret_key& recovery_key = crypto::secret_key(), bool recover = false); bool open_wallet(const std::string &wallet_file, const std::string& password); bool close_wallet(); @@ -125,6 +128,11 @@ namespace cryptonote std::string m_generate_new; std::string m_import_path; + std::string m_electrum_seed; // electrum-style seed parameter + + crypto::secret_key m_recovery_key; // recovery key (used as random for wallet gen) + bool m_recover; // recover flag + std::string m_daemon_address; std::string m_daemon_host; int m_daemon_port; -- cgit v1.2.3 From b6a475119731d88aec017fa1d69128c20da6b303 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Sun, 8 Jun 2014 18:59:02 -0400 Subject: reworked command line args for simplewallet. --generate-new-wallet and --wallet-file are now properly mutually-exclusive. --- src/simplewallet/simplewallet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/simplewallet/simplewallet.h') diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index d1f9fe98b..37ccfe895 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -131,7 +131,7 @@ namespace cryptonote std::string m_electrum_seed; // electrum-style seed parameter crypto::secret_key m_recovery_key; // recovery key (used as random for wallet gen) - bool m_recover; // recover flag + bool m_restore_deterministic_wallet; // recover flag std::string m_daemon_address; std::string m_daemon_host; -- cgit v1.2.3 From da37b6f15b6eb1f7b4ac9802a3350413d303a5c9 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Sun, 8 Jun 2014 20:04:32 -0400 Subject: allow two-random-numbers wallet generation (but not as default) --- src/simplewallet/simplewallet.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/simplewallet/simplewallet.h') diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index 37ccfe895..006cdd08e 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -40,9 +40,7 @@ namespace cryptonote bool run_console_handler(); - bool parse_electrum(); - - bool new_wallet(const std::string &wallet_file, const std::string& password, const crypto::secret_key& recovery_key = crypto::secret_key(), bool recover = false); + bool new_wallet(const std::string &wallet_file, const std::string& password, const crypto::secret_key& recovery_key = crypto::secret_key(), bool recover = false, bool two_random = false); bool open_wallet(const std::string &wallet_file, const std::string& password); bool close_wallet(); @@ -132,6 +130,7 @@ namespace cryptonote crypto::secret_key m_recovery_key; // recovery key (used as random for wallet gen) bool m_restore_deterministic_wallet; // recover flag + bool m_non_deterministic; // old 2-random generation std::string m_daemon_address; std::string m_daemon_host; -- cgit v1.2.3