Electroneum
simplewallet.h
Go to the documentation of this file.
1 // Copyrights(c) 2017-2018, 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_default_ring_size(const std::vector<std::string> &args = std::vector<std::string>());
116  bool set_auto_refresh(const std::vector<std::string> &args = std::vector<std::string>());
117  bool set_refresh_type(const std::vector<std::string> &args = std::vector<std::string>());
118  bool set_confirm_missing_payment_id(const std::vector<std::string> &args = std::vector<std::string>());
119  bool set_ask_password(const std::vector<std::string> &args = std::vector<std::string>());
120  bool set_unit(const std::vector<std::string> &args = std::vector<std::string>());
121  bool set_min_output_count(const std::vector<std::string> &args = std::vector<std::string>());
122  bool set_min_output_value(const std::vector<std::string> &args = std::vector<std::string>());
123  bool set_merge_destinations(const std::vector<std::string> &args = std::vector<std::string>());
124  bool set_confirm_backlog(const std::vector<std::string> &args = std::vector<std::string>());
125  bool set_refresh_from_block_height(const std::vector<std::string> &args = std::vector<std::string>());
126  bool set_display_progress_indicator(const std::vector<std::string> &args = std::vector<std::string>());
127  bool help(const std::vector<std::string> &args = std::vector<std::string>());
128  bool start_mining(const std::vector<std::string> &args);
129  bool stop_mining(const std::vector<std::string> &args);
130  bool set_daemon(const std::vector<std::string> &args);
131  bool save_bc(const std::vector<std::string>& args);
132  bool refresh(const std::vector<std::string> &args);
133  bool show_balance_unlocked();
134  bool show_balance(const std::vector<std::string> &args = std::vector<std::string>());
135  bool show_incoming_transfers(const std::vector<std::string> &args);
136  bool show_payments(const std::vector<std::string> &args);
137  bool show_blockchain_height(const std::vector<std::string> &args);
138  bool transfer_main(int transfer_type, const std::vector<std::string> &args);
139  bool transfer(const std::vector<std::string> &args);
140  bool transfer_new(const std::vector<std::string> &args);
141  bool locked_transfer(const std::vector<std::string> &args);
142  bool sweep_main(uint64_t below, const std::vector<std::string> &args);
143  bool sweep_all(const std::vector<std::string> &args);
144  bool sweep_below(const std::vector<std::string> &args);
145  bool sweep_unmixable(const std::vector<std::string> &args);
146  bool donate(const std::vector<std::string> &args);
147  bool sign_transfer(const std::vector<std::string> &args);
148  bool submit_transfer(const std::vector<std::string> &args);
149  std::vector<std::vector<cryptonote::tx_destination_entry>> split_amounts(
150  std::vector<cryptonote::tx_destination_entry> dsts, size_t num_splits
151  );
152  bool print_address(const std::vector<std::string> &args = std::vector<std::string>());
153  bool print_integrated_address(const std::vector<std::string> &args = std::vector<std::string>());
154  bool address_book(const std::vector<std::string> &args = std::vector<std::string>());
155  bool save(const std::vector<std::string> &args);
156  bool save_watch_only(const std::vector<std::string> &args);
157  bool set_variable(const std::vector<std::string> &args);
158  bool rescan_spent(const std::vector<std::string> &args);
159  bool set_log(const std::vector<std::string> &args);
160  bool get_tx_key(const std::vector<std::string> &args);
161  bool check_tx_key(const std::vector<std::string> &args);
162  bool check_tx_key_helper(const crypto::hash &txid, const cryptonote::account_public_address &address, const crypto::key_derivation &derivation);
163  bool get_tx_proof(const std::vector<std::string> &args);
164  bool check_tx_proof(const std::vector<std::string> &args);
165  bool show_transfers(const std::vector<std::string> &args);
166  bool unspent_outputs(const std::vector<std::string> &args);
167  bool rescan_blockchain(const std::vector<std::string> &args);
168  bool refresh_main(uint64_t start_height, bool reset = false);
169  bool set_tx_note(const std::vector<std::string> &args);
170  bool get_tx_note(const std::vector<std::string> &args);
171  bool status(const std::vector<std::string> &args);
172  bool set_default_priority(const std::vector<std::string> &args);
173  bool sign(const std::vector<std::string> &args);
174  bool verify(const std::vector<std::string> &args);
175  bool export_key_images(const std::vector<std::string> &args);
176  bool import_key_images(const std::vector<std::string> &args);
177  bool export_outputs(const std::vector<std::string> &args);
178  bool import_outputs(const std::vector<std::string> &args);
179  bool show_transfer(const std::vector<std::string> &args);
180  bool change_password(const std::vector<std::string>& args);
181  bool payment_id(const std::vector<std::string> &args);
182  bool print_fee_info(const std::vector<std::string> &args);
183 
184  uint64_t get_daemon_blockchain_height(std::string& err);
185  bool try_connect_to_daemon(bool silent = false, uint32_t* version = nullptr);
187  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());
190  bool print_ring_members(const std::vector<tools::wallet2::pending_tx>& ptx_vector, std::ostream& ostr);
191  std::string get_prompt() const;
192 
197  void print_seed(std::string seed);
198 
206  std::string get_mnemonic_language();
207 
208  //----------------- i_wallet2_callback ---------------------
209  virtual void on_new_block(uint64_t height, const cryptonote::block& block);
210  virtual void on_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t amount);
211  virtual void on_unconfirmed_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t amount);
212  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);
213  virtual void on_skip_transaction(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx);
214  //----------------------------------------------------------
215 
217 
219  {
220  public:
225  , m_print_time()
226  {
227  }
228 
229  void update(uint64_t height, bool force = false)
230  {
231  auto current_time = std::chrono::system_clock::now();
232  const auto node_update_threshold = std::chrono::seconds(DIFFICULTY_TARGET / 2); // use min of V1/V2
233  if (node_update_threshold < current_time - m_blockchain_height_update_time || m_blockchain_height <= height)
234  {
237  }
238 
239  if (std::chrono::milliseconds(20) < current_time - m_print_time || force)
240  {
241  std::cout << QT_TRANSLATE_NOOP("cryptonote::simple_wallet", "Height ") << height << " / " << m_blockchain_height << '\r' << std::flush;
242  m_print_time = current_time;
243  }
244  }
245 
246  private:
248  {
249  std::string err;
250  uint64_t blockchain_height = m_simple_wallet.get_daemon_blockchain_height(err);
251  if (err.empty())
252  {
253  m_blockchain_height = blockchain_height;
254  m_blockchain_height_update_time = std::chrono::system_clock::now();
255  }
256  else
257  {
258  LOG_ERROR("Failed to get current blockchain height: " << err);
259  }
260  }
261 
262  private:
265  std::chrono::system_clock::time_point m_blockchain_height_update_time;
266  std::chrono::system_clock::time_point m_print_time;
267  };
268 
269  private:
270  std::string m_wallet_file;
271  std::string m_generate_new;
273  std::string m_generate_from_keys;
275  std::string m_generate_from_json;
276  std::string m_mnemonic_language;
277  std::string m_import_path;
278 
279  std::string m_electrum_seed; // electrum-style seed parameter
280 
281  crypto::secret_key m_recovery_key; // recovery key (used as random for wallet gen)
282  bool m_restore_deterministic_wallet; // recover flag
283  bool m_non_deterministic; // old 2-random generation
286  bool m_restoring; // are we restoring, by whatever method?
287  uint64_t m_restore_height; // optional
288 
289  epee::console_handlers_binder m_cmd_binder;
290 
291  std::unique_ptr<tools::wallet2> m_wallet;
292  epee::net_utils::http::http_simple_client m_http_client;
294 
295  std::atomic<bool> m_idle_run;
296  boost::thread m_idle_thread;
297  boost::mutex m_idle_mutex;
298  boost::condition_variable m_idle_cond;
299 
300  std::atomic<bool> m_auto_refresh_enabled;
302  std::atomic<bool> m_in_manual_refresh;
303  };
304 }
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:4378
bool show_blockchain_height(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2231
void print_seed(std::string seed)
Prints the seed with a nice message.
Definition: simplewallet.cpp:975
bool sign_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3464
std::string m_import_path
Definition: simplewallet.h:277
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:3784
Definition: wallet2.h:252
bool show_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4865
bool show_incoming_transfers(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2087
bool get_tx_proof(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3647
#define QT_TRANSLATE_NOOP(context, str)
Definition: i18n.h:32
bool set_default_priority(const std::vector< std::string > &args)
Definition: simplewallet.cpp:525
bool show_balance_unlocked()
Definition: simplewallet.cpp:2073
bool m_restore_deterministic_wallet
Definition: simplewallet.h:282
bool set_display_progress_indicator(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:724
virtual void on_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction &tx, uint64_t amount)
Definition: simplewallet.cpp:1944
bool ask_wallet_create_if_needed()
Definition: simplewallet.cpp:887
bool set_min_output_value(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:667
std::unique_ptr< tools::wallet2 > m_wallet
Definition: simplewallet.h:291
virtual void on_unconfirmed_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction &tx, uint64_t amount)
Definition: simplewallet.cpp:1956
bool save(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1749
POD_CLASS key_derivation
Definition: crypto.h:82
std::string m_generate_from_multisig_keys
Definition: simplewallet.h:274
Definition: cryptonote_basic.h:372
bool m_non_deterministic
Definition: simplewallet.h:283
bool address_book(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:4451
bool start_mining(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1780
bool set_ask_password(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:614
uint64_t height
Definition: blockchain.cpp:87
bool spendkey(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:280
std::string m_generate_new
Definition: simplewallet.h:271
bool set_store_tx_info(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:473
bool export_key_images(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4675
bool set_unit(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:625
bool import_outputs(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4787
std::string get_mnemonic_language()
Gets the word seed language from the user.
Definition: simplewallet.cpp:1487
bool m_auto_refresh_refreshing
Definition: simplewallet.h:301
bool set_refresh_from_block_height(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:707
bool set_variable(const std::vector< std::string > &args)
Definition: simplewallet.cpp:801
bool set_confirm_backlog(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:696
bool transfer_new(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2818
bool process_command(const std::vector< std::string > &args)
Definition: simplewallet.cpp:5006
uint64_t m_restore_height
Definition: simplewallet.h:287
bool locked_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2823
uint64_t m_blockchain_height
Definition: simplewallet.h:264
bool seed_set_language(const std::vector< std::string > &args=std::vector< std::string >())
Sets seed language.
Definition: simplewallet.cpp:330
bool set_print_ring_members(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:462
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:4531
bool open_wallet(const boost::program_options::variables_map &vm)
Definition: simplewallet.cpp:1652
bool donate(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3285
bool set_refresh_type(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:586
Definition: wallet2.h:70
bool set_confirm_missing_payment_id(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:603
bool stop_mining(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1833
bool set_min_output_count(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:649
Holds cryptonote related classes and helpers.
Definition: db_bdb.cpp:225
bool unspent_outputs(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4214
bool close_wallet()
Definition: simplewallet.cpp:1716
uint64_t get_daemon_blockchain_height(std::string &err)
Definition: simplewallet.cpp:2217
std::chrono::system_clock::time_point m_print_time
Definition: simplewallet.h:266
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:2400
std::string m_wallet_file
Definition: simplewallet.h:270
bool export_outputs(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4745
Definition: wallet2.h:212
bool transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2813
void update(uint64_t height, bool force=false)
Definition: simplewallet.h:229
bool sweep_unmixable(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2829
bool try_connect_to_daemon(bool silent=false, uint32_t *version=nullptr)
Definition: simplewallet.cpp:1458
bool status(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4584
simple_wallet()
Definition: simplewallet.cpp:741
boost::thread m_idle_thread
Definition: simplewallet.h:296
boost::condition_variable m_idle_cond
Definition: simplewallet.h:298
bool help(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:735
bool set_merge_destinations(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:685
void wallet_idle_thread()
Definition: simplewallet.cpp:4337
bool seed(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:295
bool sweep_main(uint64_t below, const std::vector< std::string > &args)
Definition: simplewallet.cpp:2990
bool rescan_spent(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2245
bool init(const boost::program_options::variables_map &vm)
Definition: simplewallet.cpp:995
virtual void on_skip_transaction(uint64_t height, const crypto::hash &txid, const cryptonote::transaction &tx)
Definition: simplewallet.cpp:1973
void update_blockchain_height()
Definition: simplewallet.h:247
epee::net_utils::http::http_simple_client m_http_client
Definition: simplewallet.h:292
bool m_restoring
Definition: simplewallet.h:286
bool refresh_main(uint64_t start_height, bool reset=false)
Definition: simplewallet.cpp:1985
refresh_progress_reporter_t m_refresh_progress_reporter
Definition: simplewallet.h:293
bool get_tx_key(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3612
bool set_log(const std::vector< std::string > &args)
Definition: simplewallet.cpp:876
std::string m_generate_from_json
Definition: simplewallet.h:275
bool get_tx_note(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4559
bool show_balance(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2080
std::atomic< bool > m_in_manual_refresh
Definition: simplewallet.h:302
uint8_t version
Definition: blockchain.cpp:86
Definition: wallet2.h:246
bool save_bc(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1917
std::atomic< bool > m_auto_refresh_enabled
Definition: simplewallet.h:300
std::string get_prompt() const
Definition: simplewallet.cpp:4365
bool show_payments(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2164
Definition: cryptonote_basic.h:406
bool m_trusted_daemon
Definition: simplewallet.h:284
bool set_daemon(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1855
std::chrono::system_clock::time_point m_blockchain_height_update_time
Definition: simplewallet.h:265
cryptonote::simple_wallet & m_simple_wallet
Definition: simplewallet.h:263
bool verify(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4635
bool viewkey(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:270
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:1961
std::string get_commands_str()
Definition: simplewallet.cpp:259
POD_CLASS secret_key
Definition: crypto.h:62
bool import_key_images(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4709
bool check_tx_proof(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3897
void stop()
Definition: simplewallet.cpp:4392
bool sweep_all(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3264
boost::optional< tools::password_container > get_and_verify_password() const
Definition: simplewallet.cpp:1522
bool print_ring_members(const std::vector< tools::wallet2::pending_tx > &ptx_vector, std::ostream &ostr)
Definition: simplewallet.cpp:2292
std::string m_generate_from_keys
Definition: simplewallet.h:273
bool rescan_blockchain(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4332
bool save_watch_only(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1765
bool print_integrated_address(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:4409
bool refresh(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2057
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:1536
#define DIFFICULTY_TARGET
Definition: cryptonote_config.h:80
boost::mutex m_idle_mutex
Definition: simplewallet.h:297
POD_CLASS hash
Definition: hash.h:46
std::string m_mnemonic_language
Definition: simplewallet.h:276
bool change_password(const std::vector< std::string > &args)
Definition: simplewallet.cpp:356
bool sweep_below(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3269
std::vector< std::string > command_type
Definition: simplewallet.h:69
bool submit_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3500
std::atomic< bool > m_idle_run
Definition: simplewallet.h:295
bool sign(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4609
bool check_tx_key(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3726
bool print_fee_info(const std::vector< std::string > &args)
Definition: simplewallet.cpp:396
bool set_default_ring_size(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:490
crypto::secret_key m_recovery_key
Definition: simplewallet.h:281
bool set_always_confirm_transfers(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:451
epee::console_handlers_binder m_cmd_binder
Definition: simplewallet.h:289
std::string m_generate_from_view_key
Definition: simplewallet.h:272
bool payment_id(const std::vector< std::string > &args)
Definition: simplewallet.cpp:383
bool handle_command_line(const boost::program_options::variables_map &vm)
Definition: simplewallet.cpp:1434
bool deinit()
Definition: simplewallet.cpp:1426
bool show_transfers(const std::vector< std::string > &args)
Definition: simplewallet.cpp:4057
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:3327
Definition: cryptonote_basic.h:188
bool print_address(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:4403
void interrupt()
Definition: simplewallet.cpp:5011
bool m_allow_mismatched_daemon_version
Definition: simplewallet.h:285
bool set_auto_refresh(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:569
virtual void on_new_block(uint64_t height, const cryptonote::block &block)
Definition: simplewallet.cpp:1938
refresh_progress_reporter_t(cryptonote::simple_wallet &simple_wallet)
Definition: simplewallet.h:221
std::string m_electrum_seed
Definition: simplewallet.h:279