Electroneum
simplewallet.h
Go to the documentation of this file.
1 // Copyrights(c) 2017-2019, The Electroneum Project
2 // Copyrights(c) 2014-2017, The Monero Project
3 //
4 // All rights reserved.
5 //
6 // Redistribution and use in source and binary forms, with or without modification, are
7 // permitted provided that the following conditions are met:
8 //
9 // 1. Redistributions of source code must retain the above copyright notice, this list of
10 // conditions and the following disclaimer.
11 //
12 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
13 // of conditions and the following disclaimer in the documentation and/or other
14 // materials provided with the distribution.
15 //
16 // 3. Neither the name of the copyright holder nor the names of its contributors may be
17 // used to endorse or promote products derived from this software without specific
18 // prior written permission.
19 //
20 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
21 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
23 // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
28 // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
31 
37 #pragma once
38 
39 #include <memory>
40 
41 #include <boost/optional/optional.hpp>
42 #include <boost/program_options/variables_map.hpp>
43 
46 #include "wallet/wallet2.h"
47 #include "console_handler.h"
48 #include "common/password.h"
49 #include "crypto/crypto.h" // for definition of crypto::secret_key
50 
51 #undef ELECTRONEUM_DEFAULT_LOG_CATEGORY
52 #define ELECTRONEUM_DEFAULT_LOG_CATEGORY "wallet.simplewallet"
53 
58 namespace cryptonote
59 {
64  {
65  public:
66  static const char *tr(const char *str) { return i18n_translate(str, "cryptonote::simple_wallet"); }
67 
68  public:
69  typedef std::vector<std::string> command_type;
70 
71  simple_wallet();
72  bool init(const boost::program_options::variables_map& vm);
73  bool deinit();
74  bool run();
75  void stop();
76  void interrupt();
77 
78  //wallet *create_wallet();
79  bool process_command(const std::vector<std::string> &args);
80  std::string get_commands_str();
81  private:
82  bool handle_command_line(const boost::program_options::variables_map& vm);
83 
84  bool run_console_handler();
85 
86  void wallet_idle_thread();
87 
89  boost::optional<tools::password_container> get_and_verify_password() const;
90 
91  bool new_wallet(const boost::program_options::variables_map& vm, const crypto::secret_key& recovery_key,
92  bool recover, bool two_random, const std::string &old_language);
93  bool new_wallet(const boost::program_options::variables_map& vm, const cryptonote::account_public_address& address,
94  const boost::optional<crypto::secret_key>& spendkey, const crypto::secret_key& viewkey);
95  bool open_wallet(const boost::program_options::variables_map& vm);
96  bool close_wallet();
97 
98  bool viewkey(const std::vector<std::string> &args = std::vector<std::string>());
99  bool spendkey(const std::vector<std::string> &args = std::vector<std::string>());
100  bool seed(const std::vector<std::string> &args = std::vector<std::string>());
101 
111  bool seed_set_language(const std::vector<std::string> &args = std::vector<std::string>());
112  bool set_always_confirm_transfers(const std::vector<std::string> &args = std::vector<std::string>());
113  bool set_print_ring_members(const std::vector<std::string> &args = std::vector<std::string>());
114  bool set_store_tx_info(const std::vector<std::string> &args = std::vector<std::string>());
115  bool set_auto_refresh(const std::vector<std::string> &args = std::vector<std::string>());
116  bool set_refresh_type(const std::vector<std::string> &args = std::vector<std::string>());
117  bool set_confirm_missing_payment_id(const std::vector<std::string> &args = std::vector<std::string>());
118  bool set_ask_password(const std::vector<std::string> &args = std::vector<std::string>());
119  bool set_unit(const std::vector<std::string> &args = std::vector<std::string>());
120  bool set_min_output_count(const std::vector<std::string> &args = std::vector<std::string>());
121  bool set_min_output_value(const std::vector<std::string> &args = std::vector<std::string>());
122  bool set_merge_destinations(const std::vector<std::string> &args = std::vector<std::string>());
123  bool set_confirm_backlog(const std::vector<std::string> &args = std::vector<std::string>());
124  bool set_refresh_from_block_height(const std::vector<std::string> &args = std::vector<std::string>());
125  bool set_display_progress_indicator(const std::vector<std::string> &args = std::vector<std::string>());
126  bool help(const std::vector<std::string> &args = std::vector<std::string>());
127  bool start_mining(const std::vector<std::string> &args);
128  bool stop_mining(const std::vector<std::string> &args);
129  bool set_daemon(const std::vector<std::string> &args);
130  bool save_bc(const std::vector<std::string>& args);
131  bool refresh(const std::vector<std::string> &args);
132  bool show_balance_unlocked();
133  bool show_balance(const std::vector<std::string> &args = std::vector<std::string>());
134  bool show_incoming_transfers(const std::vector<std::string> &args);
135  bool show_payments(const std::vector<std::string> &args);
136  bool show_blockchain_height(const std::vector<std::string> &args);
137  bool transfer_main(int transfer_type, const std::vector<std::string> &args);
138  bool transfer(const std::vector<std::string> &args);
139  bool locked_transfer(const std::vector<std::string> &args);
140  bool sweep_main(uint64_t below, const std::vector<std::string> &args);
141  bool sweep_all(const std::vector<std::string> &args);
142  bool sweep_below(const std::vector<std::string> &args);
143  bool sweep_unmixable(const std::vector<std::string> &args);
144  bool donate(const std::vector<std::string> &args);
145  bool sign_transfer(const std::vector<std::string> &args);
146  bool submit_transfer(const std::vector<std::string> &args);
147  std::vector<std::vector<cryptonote::tx_destination_entry>> split_amounts(
148  std::vector<cryptonote::tx_destination_entry> dsts, size_t num_splits
149  );
150  bool print_address(const std::vector<std::string> &args = std::vector<std::string>());
151  bool print_integrated_address(const std::vector<std::string> &args = std::vector<std::string>());
152  bool address_book(const std::vector<std::string> &args = std::vector<std::string>());
153  bool save(const std::vector<std::string> &args);
154  bool save_watch_only(const std::vector<std::string> &args);
155  bool set_variable(const std::vector<std::string> &args);
156  bool rescan_spent(const std::vector<std::string> &args);
157  bool set_log(const std::vector<std::string> &args);
158  bool get_tx_key(const std::vector<std::string> &args);
159  bool check_tx_key(const std::vector<std::string> &args);
160  bool check_tx_key_helper(const crypto::hash &txid, const cryptonote::account_public_address &address, const crypto::key_derivation &derivation);
161  bool get_tx_proof(const std::vector<std::string> &args);
162  bool check_tx_proof(const std::vector<std::string> &args);
163  bool show_transfers(const std::vector<std::string> &args);
164  bool save_transfers_to_csv(const std::vector<std::string> &args);
165  bool unspent_outputs(const std::vector<std::string> &args);
166  bool rescan_blockchain(const std::vector<std::string> &args);
167  bool refresh_main(uint64_t start_height, bool reset = false);
168  bool set_tx_note(const std::vector<std::string> &args);
169  bool get_tx_note(const std::vector<std::string> &args);
170  bool status(const std::vector<std::string> &args);
171  bool set_default_priority(const std::vector<std::string> &args);
172  bool sign(const std::vector<std::string> &args);
173  bool verify(const std::vector<std::string> &args);
174  bool export_key_images(const std::vector<std::string> &args);
175  bool import_key_images(const std::vector<std::string> &args);
176  bool export_outputs(const std::vector<std::string> &args);
177  bool import_outputs(const std::vector<std::string> &args);
178  bool show_transfer(const std::vector<std::string> &args);
179  bool change_password(const std::vector<std::string>& args);
180  bool payment_id(const std::vector<std::string> &args);
181  bool print_fee_info(const std::vector<std::string> &args);
182 
183  uint64_t get_daemon_blockchain_height(std::string& err);
184  bool try_connect_to_daemon(bool silent = false, uint32_t* version = nullptr);
186  bool accept_loaded_tx(const std::function<size_t()> get_num_txes, const std::function<const tools::wallet2::tx_construction_data&(size_t)> &get_tx, const std::string &extra_message = std::string());
189  bool print_ring_members(const std::vector<tools::wallet2::pending_tx>& ptx_vector, std::ostream& ostr);
190  std::string get_prompt() const;
191 
196  void print_seed(std::string seed);
197 
205  std::string get_mnemonic_language();
206 
207  //----------------- i_wallet2_callback ---------------------
208  virtual void on_new_block(uint64_t height, const cryptonote::block& block);
209  virtual void on_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t amount);
210  virtual void on_unconfirmed_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t amount);
211  virtual void on_money_spent(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& in_tx, uint64_t amount, const cryptonote::transaction& spend_tx);
212  virtual void on_skip_transaction(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx);
213  //----------------------------------------------------------
214 
216 
218  {
219  public:
224  , m_print_time()
225  {
226  }
227 
228  void update(uint64_t height, bool force = false)
229  {
230  auto current_time = std::chrono::system_clock::now();
231  const auto node_update_threshold = std::chrono::seconds(DIFFICULTY_TARGET / 2); // use min of V1/V2
232  if (node_update_threshold < current_time - m_blockchain_height_update_time || m_blockchain_height <= height)
233  {
236  }
237 
238  if (std::chrono::milliseconds(20) < current_time - m_print_time || force)
239  {
240  std::cout << QT_TRANSLATE_NOOP("cryptonote::simple_wallet", "Height ") << height << " / " << m_blockchain_height << '\r' << std::flush;
241  m_print_time = current_time;
242  }
243  }
244 
245  private:
247  {
248  std::string err;
249  uint64_t blockchain_height = m_simple_wallet.get_daemon_blockchain_height(err);
250  if (err.empty())
251  {
252  m_blockchain_height = blockchain_height;
253  m_blockchain_height_update_time = std::chrono::system_clock::now();
254  }
255  else
256  {
257  LOG_ERROR("Failed to get current blockchain height: " << err);
258  }
259  }
260 
261  private:
264  std::chrono::system_clock::time_point m_blockchain_height_update_time;
265  std::chrono::system_clock::time_point m_print_time;
266  };
267 
268  private:
269  std::string m_wallet_file;
270  std::string m_generate_new;
272  std::string m_generate_from_keys;
274  std::string m_generate_from_json;
275  std::string m_mnemonic_language;
276  std::string m_import_path;
277 
278  std::string m_electrum_seed; // electrum-style seed parameter
279 
280  crypto::secret_key m_recovery_key; // recovery key (used as random for wallet gen)
281  bool m_restore_deterministic_wallet; // recover flag
282  bool m_non_deterministic; // old 2-random generation
285  bool m_restoring; // are we restoring, by whatever method?
286  uint64_t m_restore_height; // optional
287 
288  epee::console_handlers_binder m_cmd_binder;
289 
290  std::unique_ptr<tools::wallet2> m_wallet;
291  epee::net_utils::http::http_simple_client m_http_client;
293 
294  std::atomic<bool> m_idle_run;
295  boost::thread m_idle_thread;
296  boost::mutex m_idle_mutex;
297  boost::condition_variable m_idle_cond;
298 
299  std::atomic<bool> m_auto_refresh_enabled;
301  std::atomic<bool> m_in_manual_refresh;
302  };
303 }
std::vector< std::vector< cryptonote::tx_destination_entry > > split_amounts(std::vector< cryptonote::tx_destination_entry > dsts, size_t num_splits)
bool run()
Definition: simplewallet.cpp:4367
bool show_blockchain_height(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2193
void print_seed(std::string seed)
Prints the seed with a nice message.
Definition: simplewallet.cpp:937
bool sign_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3418
std::string m_import_path
Definition: simplewallet.h:276
static const char * tr(const char *str)
Definition: simplewallet.h:66
bool check_tx_key_helper(const crypto::hash &txid, const cryptonote::account_public_address &address, const crypto::key_derivation &derivation)
Definition: simplewallet.cpp:3738
Definition: wallet2.h:280
bool show_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4854
bool show_incoming_transfers(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2049
bool get_tx_proof(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3601
#define QT_TRANSLATE_NOOP(context, str)
Definition: i18n.h:32
bool set_default_priority(const std::vector< std::string > &args)
Definition: simplewallet.cpp:489
bool show_balance_unlocked()
Definition: simplewallet.cpp:2035
bool m_restore_deterministic_wallet
Definition: simplewallet.h:281
bool set_display_progress_indicator(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:688
virtual void on_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction &tx, uint64_t amount)
Definition: simplewallet.cpp:1906
bool ask_wallet_create_if_needed()
Definition: simplewallet.cpp:849
bool set_min_output_value(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:631
std::unique_ptr< tools::wallet2 > m_wallet
Definition: simplewallet.h:290
virtual void on_unconfirmed_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction &tx, uint64_t amount)
Definition: simplewallet.cpp:1918
bool save(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1711
POD_CLASS key_derivation
Definition: crypto.h:89
std::string m_generate_from_multisig_keys
Definition: simplewallet.h:273
Definition: cryptonote_basic.h:382
bool m_non_deterministic
Definition: simplewallet.h:282
bool address_book(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:4440
bool start_mining(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1742
bool set_ask_password(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:578
uint64_t height
Definition: blockchain.cpp:87
bool spendkey(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:279
std::string m_generate_new
Definition: simplewallet.h:270
bool set_store_tx_info(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:472
bool export_key_images(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4664
bool set_unit(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:589
bool import_outputs(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4776
std::string get_mnemonic_language()
Gets the word seed language from the user.
Definition: simplewallet.cpp:1449
bool m_auto_refresh_refreshing
Definition: simplewallet.h:300
bool set_refresh_from_block_height(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:671
bool set_variable(const std::vector< std::string > &args)
Definition: simplewallet.cpp:765
bool set_confirm_backlog(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:660
bool process_command(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4996
uint64_t m_restore_height
Definition: simplewallet.h:286
bool locked_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2777
uint64_t m_blockchain_height
Definition: simplewallet.h:263
bool seed_set_language(const std::vector< std::string > &args=std::vector< std::string >())
Sets seed language.
Definition: simplewallet.cpp:329
bool set_print_ring_members(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:461
const char * i18n_translate(const char *s, const std::string &context)
Definition: i18n.cpp:293
bool set_tx_note(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4520
bool open_wallet(const boost::program_options::variables_map &vm)
Definition: simplewallet.cpp:1614
bool donate(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3239
bool set_refresh_type(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:550
Definition: wallet2.h:72
bool set_confirm_missing_payment_id(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:567
bool stop_mining(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1795
bool set_min_output_count(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:613
Holds cryptonote related classes and helpers.
Definition: db_bdb.cpp:225
bool unspent_outputs(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4203
bool close_wallet()
Definition: simplewallet.cpp:1678
uint64_t get_daemon_blockchain_height(std::string &err)
Definition: simplewallet.cpp:2179
std::chrono::system_clock::time_point m_print_time
Definition: simplewallet.h:265
Manages wallet operations. This is the most abstracted wallet class.
Definition: simplewallet.h:63
bool transfer_main(int transfer_type, const std::vector< std::string > &args)
Definition: simplewallet.cpp:2362
std::string m_wallet_file
Definition: simplewallet.h:269
bool export_outputs(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4734
Definition: wallet2.h:214
bool transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2772
void update(uint64_t height, bool force=false)
Definition: simplewallet.h:228
bool sweep_unmixable(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2783
bool try_connect_to_daemon(bool silent=false, uint32_t *version=nullptr)
Definition: simplewallet.cpp:1420
bool status(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4573
simple_wallet()
Definition: simplewallet.cpp:705
boost::thread m_idle_thread
Definition: simplewallet.h:295
boost::condition_variable m_idle_cond
Definition: simplewallet.h:297
bool help(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:699
bool set_merge_destinations(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:649
void wallet_idle_thread()
Definition: simplewallet.cpp:4326
bool seed(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:294
bool sweep_main(uint64_t below, const std::vector< std::string > &args)
Definition: simplewallet.cpp:2944
bool rescan_spent(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2207
bool init(const boost::program_options::variables_map &vm)
Definition: simplewallet.cpp:957
virtual void on_skip_transaction(uint64_t height, const crypto::hash &txid, const cryptonote::transaction &tx)
Definition: simplewallet.cpp:1935
void update_blockchain_height()
Definition: simplewallet.h:246
epee::net_utils::http::http_simple_client m_http_client
Definition: simplewallet.h:291
bool m_restoring
Definition: simplewallet.h:285
bool refresh_main(uint64_t start_height, bool reset=false)
Definition: simplewallet.cpp:1947
refresh_progress_reporter_t m_refresh_progress_reporter
Definition: simplewallet.h:292
bool get_tx_key(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3566
bool set_log(const std::vector< std::string > &args)
Definition: simplewallet.cpp:838
std::string m_generate_from_json
Definition: simplewallet.h:274
bool get_tx_note(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4548
bool show_balance(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2042
std::atomic< bool > m_in_manual_refresh
Definition: simplewallet.h:301
uint8_t version
Definition: blockchain.cpp:86
Definition: wallet2.h:274
bool save_bc(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1879
std::atomic< bool > m_auto_refresh_enabled
Definition: simplewallet.h:299
std::string get_prompt() const
Definition: simplewallet.cpp:4354
bool show_payments(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2126
Definition: cryptonote_basic.h:421
bool save_transfers_to_csv(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4143
bool m_trusted_daemon
Definition: simplewallet.h:283
bool set_daemon(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1817
std::chrono::system_clock::time_point m_blockchain_height_update_time
Definition: simplewallet.h:264
cryptonote::simple_wallet & m_simple_wallet
Definition: simplewallet.h:262
bool verify(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4624
bool viewkey(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:269
virtual void on_money_spent(uint64_t height, const crypto::hash &txid, const cryptonote::transaction &in_tx, uint64_t amount, const cryptonote::transaction &spend_tx)
Definition: simplewallet.cpp:1923
std::string get_commands_str()
Definition: simplewallet.cpp:258
POD_CLASS secret_key
Definition: crypto.h:69
bool import_key_images(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4698
bool check_tx_proof(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3826
void stop()
Definition: simplewallet.cpp:4381
bool sweep_all(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3218
boost::optional< tools::password_container > get_and_verify_password() const
Definition: simplewallet.cpp:1484
bool print_ring_members(const std::vector< tools::wallet2::pending_tx > &ptx_vector, std::ostream &ostr)
Definition: simplewallet.cpp:2254
std::string m_generate_from_keys
Definition: simplewallet.h:272
bool rescan_blockchain(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4321
bool save_watch_only(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1727
bool print_integrated_address(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:4398
bool refresh(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2019
bool new_wallet(const boost::program_options::variables_map &vm, const crypto::secret_key &recovery_key, bool recover, bool two_random, const std::string &old_language)
Definition: simplewallet.cpp:1498
#define DIFFICULTY_TARGET
Definition: cryptonote_config.h:84
boost::mutex m_idle_mutex
Definition: simplewallet.h:296
POD_CLASS hash
Definition: hash.h:46
std::string m_mnemonic_language
Definition: simplewallet.h:275
bool change_password(const std::vector< std::string > &args)
Definition: simplewallet.cpp:355
bool sweep_below(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3223
std::vector< std::string > command_type
Definition: simplewallet.h:69
bool submit_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3454
std::atomic< bool > m_idle_run
Definition: simplewallet.h:294
bool sign(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4598
bool check_tx_key(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3680
bool print_fee_info(const std::vector< std::string > &args)
Definition: simplewallet.cpp:395
crypto::secret_key m_recovery_key
Definition: simplewallet.h:280
bool set_always_confirm_transfers(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:450
epee::console_handlers_binder m_cmd_binder
Definition: simplewallet.h:288
std::string m_generate_from_view_key
Definition: simplewallet.h:271
bool payment_id(const std::vector< std::string > &args)
Definition: simplewallet.cpp:382
bool handle_command_line(const boost::program_options::variables_map &vm)
Definition: simplewallet.cpp:1396
bool deinit()
Definition: simplewallet.cpp:1388
bool show_transfers(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3986
bool accept_loaded_tx(const std::function< size_t()> get_num_txes, const std::function< const tools::wallet2::tx_construction_data &(size_t)> &get_tx, const std::string &extra_message=std::string())
Definition: simplewallet.cpp:3281
Definition: cryptonote_basic.h:198
bool print_address(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:4392
void interrupt()
Definition: simplewallet.cpp:5001
bool m_allow_mismatched_daemon_version
Definition: simplewallet.h:284
bool set_auto_refresh(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:533
virtual void on_new_block(uint64_t height, const cryptonote::block &block)
Definition: simplewallet.cpp:1900
refresh_progress_reporter_t(cryptonote::simple_wallet &simple_wallet)
Definition: simplewallet.h:220
std::string m_electrum_seed
Definition: simplewallet.h:278