Monero
simplewallet.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2020, The Monero Project
2 //
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without modification, are
6 // permitted provided that the following conditions are met:
7 //
8 // 1. Redistributions of source code must retain the above copyright notice, this list of
9 // conditions and the following disclaimer.
10 //
11 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
12 // of conditions and the following disclaimer in the documentation and/or other
13 // materials provided with the distribution.
14 //
15 // 3. Neither the name of the copyright holder nor the names of its contributors may be
16 // used to endorse or promote products derived from this software without specific
17 // prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22 // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27 // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 //
29 // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
30 
36 #pragma once
37 
38 #include <memory>
39 
40 #include <boost/optional/optional.hpp>
41 #include <boost/program_options/variables_map.hpp>
42 
45 #include "wallet/wallet2.h"
46 #include "console_handler.h"
47 #include "math_helper.h"
48 #include "wipeable_string.h"
49 #include "common/i18n.h"
50 #include "common/password.h"
51 #include "crypto/crypto.h" // for definition of crypto::secret_key
52 
53 #undef MONERO_DEFAULT_LOG_CATEGORY
54 #define MONERO_DEFAULT_LOG_CATEGORY "wallet.simplewallet"
55 // Hardcode Monero's donation address (see #1447)
56 constexpr const char MONERO_DONATION_ADDR[] = "888tNkZrPN6JsEgekjMnABU4TBzc2Dt29EPAvkRxbANsAnjyPbb3iQ1YBRk1UXcdRsiKc9dhwMVgN5S9cQUiyoogDavup3H";
57 
62 namespace cryptonote
63 {
68  {
69  public:
70  static const char *tr(const char *str) { return i18n_translate(str, "cryptonote::simple_wallet"); }
71 
72  public:
73  typedef std::vector<std::string> command_type;
74 
75  simple_wallet();
76  bool init(const boost::program_options::variables_map& vm);
77  bool deinit();
78  bool run();
79  void stop();
80  void interrupt();
81 
82  //wallet *create_wallet();
83  bool process_command(const std::vector<std::string> &args);
84  std::string get_commands_str();
85  std::string get_command_usage(const std::vector<std::string> &args);
86  private:
87 
89 
90  bool handle_command_line(const boost::program_options::variables_map& vm);
91 
93 
94  void wallet_idle_thread();
95 
97  boost::optional<tools::password_container> get_and_verify_password() const;
98 
99  boost::optional<epee::wipeable_string> new_wallet(const boost::program_options::variables_map& vm, const crypto::secret_key& recovery_key,
100  bool recover, bool two_random, const std::string &old_language);
101  boost::optional<epee::wipeable_string> new_wallet(const boost::program_options::variables_map& vm, const cryptonote::account_public_address& address,
102  const boost::optional<crypto::secret_key>& spendkey, const crypto::secret_key& viewkey);
103  boost::optional<epee::wipeable_string> new_wallet(const boost::program_options::variables_map& vm,
104  const epee::wipeable_string &multisig_keys, const std::string &old_language);
105  boost::optional<epee::wipeable_string> new_wallet(const boost::program_options::variables_map& vm);
106  boost::optional<epee::wipeable_string> open_wallet(const boost::program_options::variables_map& vm);
107  bool close_wallet();
108 
109  bool viewkey(const std::vector<std::string> &args = std::vector<std::string>());
110  bool spendkey(const std::vector<std::string> &args = std::vector<std::string>());
111  bool seed(const std::vector<std::string> &args = std::vector<std::string>());
112  bool encrypted_seed(const std::vector<std::string> &args = std::vector<std::string>());
113  bool restore_height(const std::vector<std::string> &args = std::vector<std::string>());
114 
124  bool seed_set_language(const std::vector<std::string> &args = std::vector<std::string>());
125  bool set_always_confirm_transfers(const std::vector<std::string> &args = std::vector<std::string>());
126  bool set_print_ring_members(const std::vector<std::string> &args = std::vector<std::string>());
127  bool set_store_tx_info(const std::vector<std::string> &args = std::vector<std::string>());
128  bool set_default_ring_size(const std::vector<std::string> &args = std::vector<std::string>());
129  bool set_auto_refresh(const std::vector<std::string> &args = std::vector<std::string>());
130  bool set_refresh_type(const std::vector<std::string> &args = std::vector<std::string>());
131  bool set_confirm_missing_payment_id(const std::vector<std::string> &args = std::vector<std::string>());
132  bool set_ask_password(const std::vector<std::string> &args = std::vector<std::string>());
133  bool set_unit(const std::vector<std::string> &args = std::vector<std::string>());
134  bool set_min_output_count(const std::vector<std::string> &args = std::vector<std::string>());
135  bool set_min_output_value(const std::vector<std::string> &args = std::vector<std::string>());
136  bool set_merge_destinations(const std::vector<std::string> &args = std::vector<std::string>());
137  bool set_confirm_backlog(const std::vector<std::string> &args = std::vector<std::string>());
138  bool set_confirm_backlog_threshold(const std::vector<std::string> &args = std::vector<std::string>());
139  bool set_confirm_export_overwrite(const std::vector<std::string> &args = std::vector<std::string>());
140  bool set_refresh_from_block_height(const std::vector<std::string> &args = std::vector<std::string>());
141  bool set_auto_low_priority(const std::vector<std::string> &args = std::vector<std::string>());
142  bool set_segregate_pre_fork_outputs(const std::vector<std::string> &args = std::vector<std::string>());
143  bool set_key_reuse_mitigation2(const std::vector<std::string> &args = std::vector<std::string>());
144  bool set_subaddress_lookahead(const std::vector<std::string> &args = std::vector<std::string>());
145  bool set_segregation_height(const std::vector<std::string> &args = std::vector<std::string>());
146  bool set_ignore_fractional_outputs(const std::vector<std::string> &args = std::vector<std::string>());
147  bool set_ignore_outputs_above(const std::vector<std::string> &args = std::vector<std::string>());
148  bool set_ignore_outputs_below(const std::vector<std::string> &args = std::vector<std::string>());
149  bool set_track_uses(const std::vector<std::string> &args = std::vector<std::string>());
150  bool set_inactivity_lock_timeout(const std::vector<std::string> &args = std::vector<std::string>());
151  bool set_setup_background_mining(const std::vector<std::string> &args = std::vector<std::string>());
152  bool set_device_name(const std::vector<std::string> &args = std::vector<std::string>());
153  bool set_export_format(const std::vector<std::string> &args = std::vector<std::string>());
154  bool set_load_deprecated_formats(const std::vector<std::string> &args = std::vector<std::string>());
155  bool set_persistent_rpc_client_id(const std::vector<std::string> &args = std::vector<std::string>());
156  bool set_auto_mine_for_rpc_payment_threshold(const std::vector<std::string> &args = std::vector<std::string>());
157  bool set_credits_target(const std::vector<std::string> &args = std::vector<std::string>());
158  bool help(const std::vector<std::string> &args = std::vector<std::string>());
159  bool apropos(const std::vector<std::string> &args);
160  bool start_mining(const std::vector<std::string> &args);
161  bool stop_mining(const std::vector<std::string> &args);
162  bool set_daemon(const std::vector<std::string> &args);
163  bool save_bc(const std::vector<std::string> &args);
164  bool refresh(const std::vector<std::string> &args);
165  bool show_balance_unlocked(bool detailed = false);
166  bool show_balance(const std::vector<std::string> &args = std::vector<std::string>());
167  bool show_incoming_transfers(const std::vector<std::string> &args);
168  bool show_payments(const std::vector<std::string> &args);
169  bool show_blockchain_height(const std::vector<std::string> &args);
170  bool transfer_main(int transfer_type, const std::vector<std::string> &args, bool called_by_mms);
171  bool transfer(const std::vector<std::string> &args);
172  bool locked_transfer(const std::vector<std::string> &args);
173  bool locked_sweep_all(const std::vector<std::string> &args);
174  bool sweep_main(uint32_t account, uint64_t below, bool locked, const std::vector<std::string> &args);
175  bool sweep_all(const std::vector<std::string> &args);
176  bool sweep_account(const std::vector<std::string> &args);
177  bool sweep_below(const std::vector<std::string> &args);
178  bool sweep_single(const std::vector<std::string> &args);
179  bool sweep_unmixable(const std::vector<std::string> &args);
180  bool donate(const std::vector<std::string> &args);
181  bool sign_transfer(const std::vector<std::string> &args);
182  bool submit_transfer(const std::vector<std::string> &args);
183  std::vector<std::vector<cryptonote::tx_destination_entry>> split_amounts(
184  std::vector<cryptonote::tx_destination_entry> dsts, size_t num_splits
185  );
186  bool account(const std::vector<std::string> &args = std::vector<std::string>());
187  void print_accounts();
188  void print_accounts(const std::string& tag);
189  bool print_address(const std::vector<std::string> &args = std::vector<std::string>());
190  bool print_integrated_address(const std::vector<std::string> &args = std::vector<std::string>());
191  bool address_book(const std::vector<std::string> &args = std::vector<std::string>());
192  bool save(const std::vector<std::string> &args);
193  bool save_watch_only(const std::vector<std::string> &args);
194  bool set_variable(const std::vector<std::string> &args);
195  bool rescan_spent(const std::vector<std::string> &args);
196  bool set_log(const std::vector<std::string> &args);
197  bool get_tx_key(const std::vector<std::string> &args);
198  bool set_tx_key(const std::vector<std::string> &args);
199  bool check_tx_key(const std::vector<std::string> &args);
200  bool get_tx_proof(const std::vector<std::string> &args);
201  bool check_tx_proof(const std::vector<std::string> &args);
202  bool get_spend_proof(const std::vector<std::string> &args);
203  bool check_spend_proof(const std::vector<std::string> &args);
204  bool get_reserve_proof(const std::vector<std::string> &args);
205  bool check_reserve_proof(const std::vector<std::string> &args);
206  bool show_transfers(const std::vector<std::string> &args);
207  bool export_transfers(const std::vector<std::string> &args);
208  bool unspent_outputs(const std::vector<std::string> &args);
209  bool rescan_blockchain(const std::vector<std::string> &args);
210  bool refresh_main(uint64_t start_height, ResetType reset, bool is_init = false);
211  bool set_tx_note(const std::vector<std::string> &args);
212  bool get_tx_note(const std::vector<std::string> &args);
213  bool set_description(const std::vector<std::string> &args);
214  bool get_description(const std::vector<std::string> &args);
215  bool status(const std::vector<std::string> &args);
216  bool wallet_info(const std::vector<std::string> &args);
217  bool set_default_priority(const std::vector<std::string> &args);
218  bool sign(const std::vector<std::string> &args);
219  bool verify(const std::vector<std::string> &args);
220  bool export_key_images(const std::vector<std::string> &args);
221  bool import_key_images(const std::vector<std::string> &args);
222  bool hw_key_images_sync(const std::vector<std::string> &args);
223  bool hw_reconnect(const std::vector<std::string> &args);
224  bool export_outputs(const std::vector<std::string> &args);
225  bool import_outputs(const std::vector<std::string> &args);
226  bool show_transfer(const std::vector<std::string> &args);
227  bool change_password(const std::vector<std::string>& args);
228  bool payment_id(const std::vector<std::string> &args);
229  bool print_fee_info(const std::vector<std::string> &args);
230  bool prepare_multisig(const std::vector<std::string>& args);
231  bool prepare_multisig_main(const std::vector<std::string>& args, bool called_by_mms);
232  bool make_multisig(const std::vector<std::string>& args);
233  bool make_multisig_main(const std::vector<std::string>& args, bool called_by_mms);
234  bool finalize_multisig(const std::vector<std::string> &args);
235  bool exchange_multisig_keys(const std::vector<std::string> &args);
236  bool exchange_multisig_keys_main(const std::vector<std::string> &args, bool called_by_mms);
237  bool export_multisig(const std::vector<std::string>& args);
238  bool export_multisig_main(const std::vector<std::string>& args, bool called_by_mms);
239  bool import_multisig(const std::vector<std::string>& args);
240  bool import_multisig_main(const std::vector<std::string>& args, bool called_by_mms);
242  bool sign_multisig(const std::vector<std::string>& args);
243  bool sign_multisig_main(const std::vector<std::string>& args, bool called_by_mms);
244  bool submit_multisig(const std::vector<std::string>& args);
245  bool submit_multisig_main(const std::vector<std::string>& args, bool called_by_mms);
246  bool export_raw_multisig(const std::vector<std::string>& args);
247  bool mms(const std::vector<std::string>& args);
248  bool print_ring(const std::vector<std::string>& args);
249  bool set_ring(const std::vector<std::string>& args);
250  bool unset_ring(const std::vector<std::string>& args);
251  bool save_known_rings(const std::vector<std::string>& args);
252  bool blackball(const std::vector<std::string>& args);
253  bool unblackball(const std::vector<std::string>& args);
254  bool blackballed(const std::vector<std::string>& args);
255  bool freeze(const std::vector<std::string>& args);
256  bool thaw(const std::vector<std::string>& args);
257  bool frozen(const std::vector<std::string>& args);
258  bool lock(const std::vector<std::string>& args);
259  bool rpc_payment_info(const std::vector<std::string> &args);
260  bool start_mining_for_rpc(const std::vector<std::string> &args);
261  bool stop_mining_for_rpc(const std::vector<std::string> &args);
262  bool show_qr_code(const std::vector<std::string> &args);
263  bool net_stats(const std::vector<std::string>& args);
264  bool public_nodes(const std::vector<std::string>& args);
265  bool welcome(const std::vector<std::string>& args);
266  bool version(const std::vector<std::string>& args);
267  bool on_unknown_command(const std::vector<std::string>& args);
268 
269  bool cold_sign_tx(const std::vector<tools::wallet2::pending_tx>& ptx_vector, tools::wallet2::signed_tx_set &exported_txs, std::vector<cryptonote::address_parse_info> &dsts_info, std::function<bool(const tools::wallet2::signed_tx_set &)> accept_func);
270  uint64_t get_daemon_blockchain_height(std::string& err);
271  bool try_connect_to_daemon(bool silent = false, uint32_t* version = nullptr);
273  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());
276  bool process_ring_members(const std::vector<tools::wallet2::pending_tx>& ptx_vector, std::ostream& ostr, bool verbose);
277  std::string get_prompt() const;
278  bool print_seed(bool encrypted);
279  void key_images_sync_intern();
280  void on_refresh_finished(uint64_t start_height, uint64_t fetched_blocks, bool is_init, bool received_money);
281  std::pair<std::string, std::string> show_outputs_line(const std::vector<uint64_t> &heights, uint64_t blockchain_height, uint64_t highlight_idx = std::numeric_limits<uint64_t>::max()) const;
282  bool freeze_thaw(const std::vector<std::string>& args, bool freeze);
283  bool prompt_if_old(const std::vector<tools::wallet2::pending_tx> &ptx_vector);
284  bool on_command(bool (simple_wallet::*cmd)(const std::vector<std::string>&), const std::vector<std::string> &args);
285  bool on_empty_command();
286  bool on_cancelled_command();
287  void check_for_inactivity_lock(bool user);
288 
290  {
291  std::string type;
292  boost::variant<uint64_t, std::string> block;
293  uint64_t timestamp;
294  std::string direction;
295  bool confirmed;
296  uint64_t amount;
298  std::string payment_id;
299  uint64_t fee;
300  std::vector<std::pair<std::string, uint64_t>> outputs;
301  std::set<uint32_t> index;
302  std::string note;
303  std::string unlocked;
304  };
305  bool get_transfers(std::vector<std::string>& args_, std::vector<transfer_view>& transfers);
306 
311  void print_seed(const epee::wipeable_string &seed);
312 
320  std::string get_mnemonic_language();
321 
326  void commit_or_save(std::vector<tools::wallet2::pending_tx>& ptx_vector, bool do_not_relay);
327 
331  void check_background_mining(const epee::wipeable_string &password);
333  void stop_background_mining();
334 
335  // idle thread workers
336  bool check_inactivity();
337  bool check_refresh();
338  bool check_mms();
339  bool check_rpc_payment();
340 
341  void handle_transfer_exception(const std::exception_ptr &e, bool trusted_daemon);
342 
343  bool check_daemon_rpc_prices(const std::string &daemon_url, uint32_t &actual_cph, uint32_t &claimed_cph);
344 
345  //----------------- i_wallet2_callback ---------------------
346  virtual void on_new_block(uint64_t height, const cryptonote::block& block);
347  virtual void on_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t amount, const cryptonote::subaddress_index& subaddr_index, bool is_change, uint64_t unlock_time);
348  virtual void on_unconfirmed_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t amount, const cryptonote::subaddress_index& subaddr_index);
349  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, const cryptonote::subaddress_index& subaddr_index);
350  virtual void on_skip_transaction(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx);
351  virtual boost::optional<epee::wipeable_string> on_get_password(const char *reason);
352  virtual void on_device_button_request(uint64_t code);
353  virtual boost::optional<epee::wipeable_string> on_device_pin_request();
354  virtual boost::optional<epee::wipeable_string> on_device_passphrase_request(bool & on_device);
355  //----------------------------------------------------------
356 
358 
360  {
361  public:
366  , m_print_time()
367  {
368  }
369 
370  void update(uint64_t height, bool force = false)
371  {
372  auto current_time = std::chrono::system_clock::now();
373  const auto node_update_threshold = std::chrono::seconds(DIFFICULTY_TARGET_V1 / 2); // use min of V1/V2
374  if (node_update_threshold < current_time - m_blockchain_height_update_time || m_blockchain_height <= height)
375  {
377  m_blockchain_height = (std::max)(m_blockchain_height, height);
378  }
379 
380  if (std::chrono::milliseconds(20) < current_time - m_print_time || force)
381  {
382  std::cout << QT_TRANSLATE_NOOP("cryptonote::simple_wallet", "Height ") << height << " / " << m_blockchain_height << '\r' << std::flush;
383  m_print_time = current_time;
384  }
385  }
386 
387  private:
389  {
390  std::string err;
391  uint64_t blockchain_height = m_simple_wallet.get_daemon_blockchain_height(err);
392  if (err.empty())
393  {
394  m_blockchain_height = blockchain_height;
395  m_blockchain_height_update_time = std::chrono::system_clock::now();
396  }
397  else
398  {
399  LOG_ERROR("Failed to get current blockchain height: " << err);
400  }
401  }
402 
403  private:
406  std::chrono::system_clock::time_point m_blockchain_height_update_time;
407  std::chrono::system_clock::time_point m_print_time;
408  };
409 
410  private:
411  std::string m_wallet_file;
412  std::string m_generate_new;
416  std::string m_generate_from_keys;
418  std::string m_generate_from_json;
419  std::string m_mnemonic_language;
420  std::string m_import_path;
422  std::string m_restore_date; // optional - converted to m_restore_height
423 
424  epee::wipeable_string m_electrum_seed; // electrum-style seed parameter
425 
426  crypto::secret_key m_recovery_key; // recovery key (used as random for wallet gen)
427  bool m_restore_deterministic_wallet; // recover flag
428  bool m_restore_multisig_wallet; // recover flag
429  bool m_non_deterministic; // old 2-random generation
431  bool m_restoring; // are we restoring, by whatever method?
432  uint64_t m_restore_height; // optional
435 
436  epee::console_handlers_binder m_cmd_binder;
437 
438  std::unique_ptr<tools::wallet2> m_wallet;
440 
441  std::atomic<bool> m_idle_run;
442  boost::thread m_idle_thread;
443  boost::mutex m_idle_mutex;
444  boost::condition_variable m_idle_cond;
445 
446  std::atomic<bool> m_auto_refresh_enabled;
448  std::atomic<bool> m_in_manual_refresh;
450 
451  std::atomic<time_t> m_last_activity_time;
452  std::atomic<bool> m_locked;
453  std::atomic<bool> m_in_command;
454 
455  template<uint64_t mini, uint64_t maxi> struct get_random_interval { public: uint64_t operator()() const { return crypto::rand_range(mini, maxi); } };
456 
457  epee::math_helper::once_a_time_seconds<1> m_inactivity_checker;
458  epee::math_helper::once_a_time_seconds_range<get_random_interval<80 * 1000000, 100 * 1000000>> m_refresh_checker;
459  epee::math_helper::once_a_time_seconds_range<get_random_interval<90 * 1000000, 110 * 1000000>> m_mms_checker;
460  epee::math_helper::once_a_time_seconds_range<get_random_interval<90 * 1000000, 115 * 1000000>> m_rpc_payment_checker;
461 
462  std::atomic<bool> m_need_payment;
463  boost::posix_time::ptime m_last_rpc_payment_mining_time;
467  std::atomic<bool> m_suspend_rpc_payment_mining;
468 
469  std::unordered_map<std::string, uint32_t> m_claimed_cph;
470 
471  // MMS
472  mms::message_store& get_message_store() const { return m_wallet->get_message_store(); };
473  mms::multisig_wallet_state get_multisig_wallet_state() const { return m_wallet->get_multisig_wallet_state(); };
474  bool mms_active() const { return get_message_store().get_active(); };
475  bool choose_mms_processing(const std::vector<mms::processing_data> &data_list, uint32_t &choice);
476  void list_mms_messages(const std::vector<mms::message> &messages);
477  void list_signers(const std::vector<mms::authorized_signer> &signers);
479  void show_message(const mms::message &m);
481  void check_for_messages();
482  bool user_confirms(const std::string &question);
484  bool get_message_from_arg(const std::string &arg, mms::message &m);
485  bool get_number_from_arg(const std::string &arg, uint32_t &number, const uint32_t lower_bound, const uint32_t upper_bound);
486 
487  void mms_init(const std::vector<std::string> &args);
488  void mms_info(const std::vector<std::string> &args);
489  void mms_signer(const std::vector<std::string> &args);
490  void mms_list(const std::vector<std::string> &args);
491  void mms_next(const std::vector<std::string> &args);
492  void mms_sync(const std::vector<std::string> &args);
493  void mms_transfer(const std::vector<std::string> &args);
494  void mms_delete(const std::vector<std::string> &args);
495  void mms_send(const std::vector<std::string> &args);
496  void mms_receive(const std::vector<std::string> &args);
497  void mms_export(const std::vector<std::string> &args);
498  void mms_note(const std::vector<std::string> &args);
499  void mms_show(const std::vector<std::string> &args);
500  void mms_set(const std::vector<std::string> &args);
501  void mms_help(const std::vector<std::string> &args);
502  void mms_send_signer_config(const std::vector<std::string> &args);
503  void mms_start_auto_config(const std::vector<std::string> &args);
504  void mms_config_checksum(const std::vector<std::string> &args);
505  void mms_stop_auto_config(const std::vector<std::string> &args);
506  void mms_auto_config(const std::vector<std::string> &args);
507  };
508 }
cryptonote::simple_wallet::m_in_manual_refresh
std::atomic< bool > m_in_manual_refresh
Definition: simplewallet.h:448
cryptonote::simple_wallet::simple_wallet
simple_wallet()
Definition: simplewallet.cpp:3197
cryptonote::simple_wallet::stop_mining
bool stop_mining(const std::vector< std::string > &args)
Definition: simplewallet.cpp:5426
cryptonote::simple_wallet::restore_height
bool restore_height(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:840
tools::wallet2::unsigned_tx_set
Definition: wallet2.h:575
cryptonote::simple_wallet::get_spend_proof
bool get_spend_proof(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8244
cryptonote::simple_wallet::run_console_handler
bool run_console_handler()
cryptonote::simple_wallet::m_locked
std::atomic< bool > m_locked
Definition: simplewallet.h:452
cryptonote::simple_wallet::check_inactivity
bool check_inactivity()
Definition: simplewallet.cpp:9110
cryptonote::simple_wallet::print_ring
bool print_ring(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1675
cryptonote::simple_wallet::m_restoring
bool m_restoring
Definition: simplewallet.h:431
cryptonote::simple_wallet::transfer_view::fee
uint64_t fee
Definition: simplewallet.h:299
cryptonote::simple_wallet::on_money_received
virtual void on_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction &tx, uint64_t amount, const cryptonote::subaddress_index &subaddr_index, bool is_change, uint64_t unlock_time)
Definition: simplewallet.cpp:5595
cryptonote::simple_wallet::sweep_account
bool sweep_account(const std::vector< std::string > &args)
Definition: simplewallet.cpp:7559
cryptonote::simple_wallet::set_key_reuse_mitigation2
bool set_key_reuse_mitigation2(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2891
cryptonote::simple_wallet::transfer_view::block
boost::variant< uint64_t, std::string > block
Definition: simplewallet.h:292
cryptonote::simple_wallet::unspent_outputs
bool unspent_outputs(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8849
cryptonote::simple_wallet::on_unconfirmed_money_received
virtual void on_unconfirmed_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction &tx, uint64_t amount, const cryptonote::subaddress_index &subaddr_index)
Definition: simplewallet.cpp:5642
cryptonote::simple_wallet::mms_help
void mms_help(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11314
cryptonote::simple_wallet::ResetSoftKeepKI
@ ResetSoftKeepKI
Definition: simplewallet.h:88
cryptonote::simple_wallet::print_accounts
void print_accounts()
Definition: simplewallet.cpp:9408
cryptonote::simple_wallet::get_tx_key
bool get_tx_key(const std::vector< std::string > &args)
Definition: simplewallet.cpp:7919
cryptonote::simple_wallet::set_persistent_rpc_client_id
bool set_persistent_rpc_client_id(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2844
cryptonote::simple_wallet::m_last_rpc_payment_mining_time
boost::posix_time::ptime m_last_rpc_payment_mining_time
Definition: simplewallet.h:463
cryptonote::simple_wallet::set_merge_destinations
bool set_merge_destinations(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2744
cryptonote::simple_wallet::set_log
bool set_log(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3886
cryptonote::simple_wallet::set_auto_mine_for_rpc_payment_threshold
bool set_auto_mine_for_rpc_payment_threshold(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2857
cryptonote::simple_wallet::on_unknown_command
bool on_unknown_command(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2316
cryptonote::simple_wallet::set_segregate_pre_fork_outputs
bool set_segregate_pre_fork_outputs(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2831
cryptonote::subaddress_index
Definition: subaddress_index.h:39
cryptonote::simple_wallet::export_multisig
bool export_multisig(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1235
cryptonote::simple_wallet::get_reserve_proof
bool get_reserve_proof(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8328
cryptonote::simple_wallet::check_mms
bool check_mms()
Definition: simplewallet.cpp:9144
cryptonote::simple_wallet::m_auto_refresh_enabled
std::atomic< bool > m_auto_refresh_enabled
Definition: simplewallet.h:446
cryptonote::simple_wallet::m_in_command
std::atomic< bool > m_in_command
Definition: simplewallet.h:453
mms::message_store
Definition: message_store.h:267
cryptonote::simple_wallet::finalize_multisig
bool finalize_multisig(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1117
cryptonote::simple_wallet::ResetType
ResetType
Definition: simplewallet.h:88
cryptonote::simple_wallet::m_idle_thread
boost::thread m_idle_thread
Definition: simplewallet.h:442
account.h
cryptonote::simple_wallet::sweep_all
bool sweep_all(const std::vector< std::string > &args)
Definition: simplewallet.cpp:7553
cryptonote::simple_wallet::get_prompt
std::string get_prompt() const
Definition: simplewallet.cpp:9228
cryptonote::simple_wallet::export_multisig_main
bool export_multisig_main(const std::vector< std::string > &args, bool called_by_mms)
Definition: simplewallet.cpp:1241
cryptonote::simple_wallet::m_generate_from_keys
std::string m_generate_from_keys
Definition: simplewallet.h:416
cryptonote::simple_wallet::rescan_blockchain
bool rescan_blockchain(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8987
cryptonote::simple_wallet::prepare_multisig_main
bool prepare_multisig_main(const std::vector< std::string > &args, bool called_by_mms)
Definition: simplewallet.cpp:990
cryptonote::simple_wallet::welcome
bool welcome(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2292
cryptonote::simple_wallet::m_subaddress_lookahead
std::string m_subaddress_lookahead
Definition: simplewallet.h:421
cryptonote::simple_wallet::print_integrated_address
bool print_integrated_address(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:9605
cryptonote::simple_wallet::start_background_mining
void start_background_mining()
Definition: simplewallet.cpp:5247
cryptonote::simple_wallet::set_daemon
bool set_daemon(const std::vector< std::string > &args)
Definition: simplewallet.cpp:5482
cryptonote::simple_wallet::set_confirm_missing_payment_id
bool set_confirm_missing_payment_id(const std::vector< std::string > &args=std::vector< std::string >())
cryptonote::simple_wallet::m_rpc_payment_mining_requested
bool m_rpc_payment_mining_requested
Definition: simplewallet.h:464
cryptonote::simple_wallet::m_refresh_progress_reporter
refresh_progress_reporter_t m_refresh_progress_reporter
Definition: simplewallet.h:439
cryptonote::simple_wallet::check_for_messages
void check_for_messages()
Definition: simplewallet.cpp:9054
cryptonote::simple_wallet::transfer_view::payment_id
std::string payment_id
Definition: simplewallet.h:298
cryptonote::simple_wallet::transfer_main
bool transfer_main(int transfer_type, const std::vector< std::string > &args, bool called_by_mms)
Definition: simplewallet.cpp:6428
cryptonote::simple_wallet::ResetHard
@ ResetHard
Definition: simplewallet.h:88
cryptonote::simple_wallet::set_tx_key
bool set_tx_key(const std::vector< std::string > &args)
Definition: simplewallet.cpp:7962
cryptonote::simple_wallet::wallet_idle_thread
void wallet_idle_thread()
Definition: simplewallet.cpp:9070
cryptonote::simple_wallet::m_mnemonic_language
std::string m_mnemonic_language
Definition: simplewallet.h:419
cryptonote::simple_wallet::refresh_progress_reporter_t::m_simple_wallet
cryptonote::simple_wallet & m_simple_wallet
Definition: simplewallet.h:404
cryptonote::simple_wallet::mms_sync
void mms_sync(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11099
cryptonote::simple_wallet::get_tx_note
bool get_tx_note(const std::vector< std::string > &args)
Definition: simplewallet.cpp:9763
cryptonote::simple_wallet::check_refresh
bool check_refresh()
Definition: simplewallet.cpp:9125
cryptonote::simple_wallet::change_password
bool change_password(const std::vector< std::string > &args)
Definition: simplewallet.cpp:896
cryptonote::simple_wallet::init
bool init(const boost::program_options::variables_map &vm)
Definition: simplewallet.cpp:4058
cryptonote::simple_wallet::show_balance
bool show_balance(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:5916
cryptonote::simple_wallet::on_skip_transaction
virtual void on_skip_transaction(uint64_t height, const crypto::hash &txid, const cryptonote::transaction &tx)
Definition: simplewallet.cpp:5664
cryptonote::simple_wallet::m_claimed_cph
std::unordered_map< std::string, uint32_t > m_claimed_cph
Definition: simplewallet.h:469
cryptonote::simple_wallet::m_restore_multisig_wallet
bool m_restore_multisig_wallet
Definition: simplewallet.h:428
cryptonote::simple_wallet::transfer_view::unlocked
std::string unlocked
Definition: simplewallet.h:303
cryptonote::simple_wallet::check_tx_key
bool check_tx_key(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8078
cryptonote::simple_wallet::import_multisig_main
bool import_multisig_main(const std::vector< std::string > &args, bool called_by_mms)
Definition: simplewallet.cpp:1306
cryptonote::simple_wallet::mms_receive
void mms_receive(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11174
cryptonote::simple_wallet::print_seed
bool print_seed(bool encrypted)
Definition: simplewallet.cpp:770
cryptonote::simple_wallet::get_message_store
mms::message_store & get_message_store() const
Definition: simplewallet.h:472
cryptonote::simple_wallet::m_current_subaddress_account
uint32_t m_current_subaddress_account
Definition: simplewallet.h:449
cryptonote::simple_wallet::show_payments
bool show_payments(const std::vector< std::string > &args)
Definition: simplewallet.cpp:6059
cryptonote::simple_wallet::set_confirm_export_overwrite
bool set_confirm_export_overwrite(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2788
cryptonote::simple_wallet::transfer_view::amount
uint64_t amount
Definition: simplewallet.h:296
cryptonote::simple_wallet::refresh
bool refresh(const std::vector< std::string > &args)
Definition: simplewallet.cpp:5861
cryptonote::simple_wallet::blackballed
bool blackballed(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2127
cryptonote::simple_wallet::m_electrum_seed
epee::wipeable_string m_electrum_seed
Definition: simplewallet.h:424
cryptonote::simple_wallet::set_ignore_outputs_above
bool set_ignore_outputs_above(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2950
cryptonote::simple_wallet::check_spend_proof
bool check_spend_proof(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8290
QT_TRANSLATE_NOOP
#define QT_TRANSLATE_NOOP(context, str)
Definition: i18n.h:31
cryptonote::simple_wallet::m_generate_from_json
std::string m_generate_from_json
Definition: simplewallet.h:418
cryptonote::simple_wallet::get_transfers
bool get_transfers(std::vector< std::string > &args_, std::vector< transfer_view > &transfers)
Definition: simplewallet.cpp:8451
cryptonote::simple_wallet::m_rpc_payment_checker
epee::math_helper::once_a_time_seconds_range< get_random_interval< 90 *1000000, 115 *1000000 > > m_rpc_payment_checker
Definition: simplewallet.h:460
cryptonote::simple_wallet::mms_show
void mms_show(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11260
cryptonote::simple_wallet::get_commands_str
std::string get_commands_str()
Definition: simplewallet.cpp:699
cryptonote::simple_wallet::import_key_images
bool import_key_images(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10028
cryptonote::simple_wallet::print_address
bool print_address(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:9464
cryptonote::simple_wallet::mms_set
void mms_set(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11277
cryptonote::simple_wallet::make_multisig_main
bool make_multisig_main(const std::vector< std::string > &args, bool called_by_mms)
Definition: simplewallet.cpp:1035
cryptonote::simple_wallet::save_bc
bool save_bc(const std::vector< std::string > &args)
Definition: simplewallet.cpp:5566
cryptonote::simple_wallet::m_idle_run
std::atomic< bool > m_idle_run
Definition: simplewallet.h:441
crypto::secret_key
epee::mlocked< tools::scrubbed< ec_scalar > > secret_key
Definition: crypto.h:67
cryptonote::simple_wallet::set_track_uses
bool set_track_uses(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2986
cryptonote::simple_wallet::set_default_ring_size
bool set_default_ring_size(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2501
cryptonote::simple_wallet::set_auto_low_priority
bool set_auto_low_priority(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2818
cryptonote::simple_wallet::get_and_verify_password
boost::optional< tools::password_container > get_and_verify_password() const
Definition: simplewallet.cpp:4805
mms::message
Definition: message_store.h:103
cryptonote::simple_wallet::m_recovery_key
crypto::secret_key m_recovery_key
Definition: simplewallet.h:426
cryptonote::simple_wallet::freeze
bool freeze(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2200
cryptonote::simple_wallet::on_device_pin_request
virtual boost::optional< epee::wipeable_string > on_device_pin_request()
Definition: simplewallet.cpp:5701
cryptonote::simple_wallet::sign_multisig
bool sign_multisig(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1395
cryptonote::simple_wallet::list_mms_messages
void list_mms_messages(const std::vector< mms::message > &messages)
Definition: simplewallet.cpp:10631
cryptonote::simple_wallet::set_credits_target
bool set_credits_target(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2874
cryptonote::simple_wallet::save_watch_only
bool save_watch_only(const std::vector< std::string > &args)
Definition: simplewallet.cpp:5217
cryptonote::simple_wallet::payment_id
bool payment_id(const std::vector< std::string > &args)
Definition: simplewallet.cpp:924
cryptonote::simple_wallet::set_description
bool set_description(const std::vector< std::string > &args)
Definition: simplewallet.cpp:9788
cryptonote::simple_wallet::m_do_not_relay
bool m_do_not_relay
Definition: simplewallet.h:433
cryptonote::simple_wallet::show_transfers
bool show_transfers(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8707
cryptonote::simple_wallet::set_device_name
bool set_device_name(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:3047
cryptonote::simple_wallet::show_balance_unlocked
bool show_balance_unlocked(bool detailed=false)
Definition: simplewallet.cpp:5877
cryptonote::simple_wallet::m_daemon_rpc_payment_message_displayed
bool m_daemon_rpc_payment_message_displayed
Definition: simplewallet.h:465
cryptonote::simple_wallet::handle_transfer_exception
void handle_transfer_exception(const std::exception_ptr &e, bool trusted_daemon)
Definition: simplewallet.cpp:526
cryptonote::simple_wallet::verify
bool verify(const std::vector< std::string > &args)
Definition: simplewallet.cpp:9937
cryptonote::simple_wallet::mms
bool mms(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11445
cryptonote::simple_wallet::mms_export
void mms_export(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11191
cryptonote::simple_wallet::m_restore_date
std::string m_restore_date
Definition: simplewallet.h:422
cryptonote_basic_impl.h
cryptonote::simple_wallet::viewkey
bool viewkey(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:731
cryptonote::simple_wallet::sign_transfer
bool sign_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:7820
cryptonote::simple_wallet::get_random_interval::operator()
uint64_t operator()() const
Definition: simplewallet.h:455
cryptonote::simple_wallet::transfer_view::index
std::set< uint32_t > index
Definition: simplewallet.h:301
cryptonote::simple_wallet::refresh_progress_reporter_t::update
void update(uint64_t height, bool force=false)
Definition: simplewallet.h:370
cryptonote::simple_wallet::commit_or_save
void commit_or_save(std::vector< tools::wallet2::pending_tx > &ptx_vector, bool do_not_relay)
When –do-not-relay option is specified, save the raw tx hex blob to a file instead of calling m_walle...
Definition: simplewallet.cpp:10392
cryptonote::simple_wallet::submit_multisig_main
bool submit_multisig_main(const std::vector< std::string > &args, bool called_by_mms)
Definition: simplewallet.cpp:1516
cryptonote::simple_wallet::command_type
std::vector< std::string > command_type
Definition: simplewallet.h:73
cryptonote::simple_wallet::submit_transfer
bool submit_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:7884
cryptonote::simple_wallet::sign_multisig_main
bool sign_multisig_main(const std::vector< std::string > &args, bool called_by_mms)
Definition: simplewallet.cpp:1401
cryptonote::simple_wallet::mms_send
void mms_send(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11152
cryptonote::simple_wallet::show_message
void show_message(const mms::message &m)
Definition: simplewallet.cpp:10694
cryptonote::simple_wallet::refresh_progress_reporter_t::m_print_time
std::chrono::system_clock::time_point m_print_time
Definition: simplewallet.h:407
cryptonote::simple_wallet::show_incoming_transfers
bool show_incoming_transfers(const std::vector< std::string > &args)
Definition: simplewallet.cpp:5928
cryptonote::simple_wallet::check_tx_proof
bool check_tx_proof(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8166
cryptonote::simple_wallet::get_tx_proof
bool get_tx_proof(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8038
cryptonote::simple_wallet::set_ignore_fractional_outputs
bool set_ignore_fractional_outputs(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2936
mms::multisig_wallet_state
Definition: message_store.h:241
cryptonote::simple_wallet::stop
void stop()
Definition: simplewallet.cpp:9256
cryptonote::simple_wallet::sign
bool sign(const std::vector< std::string > &args)
Definition: simplewallet.cpp:9873
cryptonote::simple_wallet::user_confirms_auto_config
bool user_confirms_auto_config()
Definition: simplewallet.cpp:10546
cryptonote::simple_wallet::sweep_main
bool sweep_main(uint32_t account, uint64_t below, bool locked, const std::vector< std::string > &args)
Definition: simplewallet.cpp:7000
cryptonote::simple_wallet::set_always_confirm_transfers
bool set_always_confirm_transfers(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2456
cryptonote::simple_wallet::show_qr_code
bool show_qr_code(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2400
cryptonote::simple_wallet::m_cmd_binder
epee::console_handlers_binder m_cmd_binder
Definition: simplewallet.h:436
cryptonote::simple_wallet::set_default_priority
bool set_default_priority(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2554
cryptonote::simple_wallet::submit_multisig
bool submit_multisig(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1510
i18n.h
cryptonote::simple_wallet::list_signers
void list_signers(const std::vector< mms::authorized_signer > &signers)
Definition: simplewallet.cpp:10655
cryptonote::simple_wallet::deinit
bool deinit()
Definition: simplewallet.cpp:4689
cryptonote::simple_wallet::m_mms_checker
epee::math_helper::once_a_time_seconds_range< get_random_interval< 90 *1000000, 110 *1000000 > > m_mms_checker
Definition: simplewallet.h:459
cryptonote::simple_wallet::ask_send_all_ready_messages
void ask_send_all_ready_messages()
Definition: simplewallet.cpp:10740
cryptonote::simple_wallet::mms_send_signer_config
void mms_send_signer_config(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11330
cryptonote::simple_wallet::m_inactivity_checker
epee::math_helper::once_a_time_seconds< 1 > m_inactivity_checker
Definition: simplewallet.h:457
cryptonote::simple_wallet::split_amounts
std::vector< std::vector< cryptonote::tx_destination_entry > > split_amounts(std::vector< cryptonote::tx_destination_entry > dsts, size_t num_splits)
cryptonote::simple_wallet::mms_note
void mms_note(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11216
password.h
cryptonote::simple_wallet::transfer_view::note
std::string note
Definition: simplewallet.h:302
cryptonote::simple_wallet::rpc_payment_info
bool rpc_payment_info(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1940
cryptonote::simple_wallet::locked_sweep_all
bool locked_sweep_all(const std::vector< std::string > &args)
Definition: simplewallet.cpp:6887
build_protob.args
args
Definition: build_protob.py:10
cryptonote::simple_wallet::m_suspend_rpc_payment_mining
std::atomic< bool > m_suspend_rpc_payment_mining
Definition: simplewallet.h:467
cryptonote::simple_wallet::ask_wallet_create_if_needed
bool ask_wallet_create_if_needed()
Definition: simplewallet.cpp:3915
cryptonote::simple_wallet::m_idle_mutex
boost::mutex m_idle_mutex
Definition: simplewallet.h:443
cryptonote::simple_wallet::public_nodes
bool public_nodes(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2253
cryptonote::simple_wallet::prompt_if_old
bool prompt_if_old(const std::vector< tools::wallet2::pending_tx > &ptx_vector)
Definition: simplewallet.cpp:6328
cryptonote::simple_wallet::set_load_deprecated_formats
bool set_load_deprecated_formats(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:3103
cryptonote::simple_wallet::m_import_path
std::string m_import_path
Definition: simplewallet.h:420
cryptonote::simple_wallet::sweep_below
bool sweep_below(const std::vector< std::string > &args)
Definition: simplewallet.cpp:7579
cryptonote::simple_wallet::ResetSoft
@ ResetSoft
Definition: simplewallet.h:88
cryptonote::simple_wallet::account
bool account(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:9261
cryptonote::simple_wallet::mms_list
void mms_list(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10897
cryptonote::simple_wallet::interrupt
void interrupt()
Definition: simplewallet.cpp:10380
cryptonote::simple_wallet::set_auto_refresh
bool set_auto_refresh(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2610
cryptonote::simple_wallet::m_allow_mismatched_daemon_version
bool m_allow_mismatched_daemon_version
Definition: simplewallet.h:430
cryptonote::simple_wallet::set_segregation_height
bool set_segregation_height(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2919
cryptonote::simple_wallet::frozen
bool frozen(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2210
cryptonote::simple_wallet::print_fee_info
bool print_fee_info(const std::vector< std::string > &args)
Definition: simplewallet.cpp:929
cryptonote::block
Definition: cryptonote_basic.h:464
cryptonote::simple_wallet::address_book
bool address_book(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:9675
cryptonote::simple_wallet::start_mining
bool start_mining(const std::vector< std::string > &args)
Definition: simplewallet.cpp:5367
cryptonote::simple_wallet
Manages wallet operations. This is the most abstracted wallet class.
Definition: simplewallet.h:68
cryptonote::simple_wallet::exchange_multisig_keys_main
bool exchange_multisig_keys_main(const std::vector< std::string > &args, bool called_by_mms)
Definition: simplewallet.cpp:1175
cryptonote::simple_wallet::handle_command_line
bool handle_command_line(const boost::program_options::variables_map &vm)
Definition: simplewallet.cpp:4697
cryptonote::simple_wallet::hw_key_images_sync
bool hw_key_images_sync(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10065
cryptonote::simple_wallet::user_confirms
bool user_confirms(const std::string &question)
Definition: simplewallet.cpp:10540
cryptonote::simple_wallet::m_generate_from_view_key
std::string m_generate_from_view_key
Definition: simplewallet.h:414
cryptonote::simple_wallet::m_generate_from_spend_key
std::string m_generate_from_spend_key
Definition: simplewallet.h:415
cryptonote::simple_wallet::transfer_view::hash
crypto::hash hash
Definition: simplewallet.h:297
cryptonote::simple_wallet::m_restore_deterministic_wallet
bool m_restore_deterministic_wallet
Definition: simplewallet.h:427
cryptonote::simple_wallet::show_outputs_line
std::pair< std::string, std::string > show_outputs_line(const std::vector< uint64_t > &heights, uint64_t blockchain_height, uint64_t highlight_idx=std::numeric_limits< uint64_t >::max()) const
Definition: simplewallet.cpp:6188
mms::message_store::get_active
bool get_active() const
Definition: message_store.h:280
cryptonote::simple_wallet::show_blockchain_height
bool show_blockchain_height(const std::vector< std::string > &args)
Definition: simplewallet.cpp:6122
cryptonote::simple_wallet::get_message_from_arg
bool get_message_from_arg(const std::string &arg, mms::message &m)
Definition: simplewallet.cpp:10774
cryptonote
Holds cryptonote related classes and helpers.
Definition: blockchain_db.cpp:45
cryptonote::simple_wallet::check_reserve_proof
bool check_reserve_proof(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8379
cryptonote::simple_wallet::m_generate_new
std::string m_generate_new
Definition: simplewallet.h:412
cryptonote::simple_wallet::set_store_tx_info
bool set_store_tx_info(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2482
crypto::rand_range
std::enable_if< std::is_integral< T >::value, T >::type rand_range(T range_min, T range_max)
Definition: crypto.h:182
cryptonote::simple_wallet::tr
static const char * tr(const char *str)
Definition: simplewallet.h:70
cryptonote::simple_wallet::stop_mining_for_rpc
bool stop_mining_for_rpc(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2388
cryptonote::simple_wallet::on_cancelled_command
bool on_cancelled_command()
Definition: simplewallet.cpp:2329
cryptonote::simple_wallet::import_outputs
bool import_outputs(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10185
cryptonote::simple_wallet::show_transfer
bool show_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10222
tools::wallet2::tx_construction_data
Definition: wallet2.h:489
cryptonote::simple_wallet::save
bool save(const std::vector< std::string > &args)
Definition: simplewallet.cpp:5201
cryptonote::simple_wallet::set_refresh_from_block_height
bool set_refresh_from_block_height(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2801
cryptonote::simple_wallet::m_generate_from_multisig_keys
std::string m_generate_from_multisig_keys
Definition: simplewallet.h:417
cryptonote::simple_wallet::on_new_block
virtual void on_new_block(uint64_t height, const cryptonote::block &block)
Definition: simplewallet.cpp:5587
MONERO_DONATION_ADDR
constexpr const char MONERO_DONATION_ADDR[]
Definition: simplewallet.h:56
cryptonote::simple_wallet::key_images_sync_intern
void key_images_sync_intern()
Definition: simplewallet.cpp:10083
cryptonote::simple_wallet::stop_background_mining
void stop_background_mining()
Definition: simplewallet.cpp:5279
cryptonote::simple_wallet::prepare_multisig
bool prepare_multisig(const std::vector< std::string > &args)
Definition: simplewallet.cpp:984
cryptonote::simple_wallet::encrypted_seed
bool encrypted_seed(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:835
cryptonote::simple_wallet::get_command_usage
std::string get_command_usage(const std::vector< std::string > &args)
Definition: simplewallet.cpp:710
cryptonote::simple_wallet::set_ignore_outputs_below
bool set_ignore_outputs_below(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2969
cryptonote::simple_wallet::set_ring
bool set_ring(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1726
cryptonote::simple_wallet::run
bool run()
Definition: simplewallet.cpp:9242
cryptonote::simple_wallet::check_daemon_rpc_prices
bool check_daemon_rpc_prices(const std::string &daemon_url, uint32_t &actual_cph, uint32_t &claimed_cph)
Definition: simplewallet.cpp:5448
cryptonote::simple_wallet::m_restore_height
uint64_t m_restore_height
Definition: simplewallet.h:432
cryptonote::simple_wallet::make_multisig
bool make_multisig(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1029
cryptonote::simple_wallet::spendkey
bool spendkey(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:748
cryptonote::simple_wallet::mms_signer
void mms_signer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10840
cryptonote::simple_wallet::new_wallet
boost::optional< epee::wipeable_string > 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:4819
cryptonote::simple_wallet::ResetNone
@ ResetNone
Definition: simplewallet.h:88
cryptonote::simple_wallet::transfer_view::timestamp
uint64_t timestamp
Definition: simplewallet.h:293
cryptonote::simple_wallet::set_min_output_value
bool set_min_output_value(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2726
cryptonote::simple_wallet::check_background_mining
void check_background_mining(const epee::wipeable_string &password)
checks whether background mining is enabled, and asks to configure it if not
Definition: simplewallet.cpp:5307
cryptonote::simple_wallet::lock
bool lock(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2239
cryptonote::simple_wallet::transfer_view::direction
std::string direction
Definition: simplewallet.h:294
cryptonote::simple_wallet::mms_init
void mms_init(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10794
cryptonote::simple_wallet::freeze_thaw
bool freeze_thaw(const std::vector< std::string > &args, bool freeze)
Definition: simplewallet.cpp:2171
cryptonote::simple_wallet::start_mining_for_rpc
bool start_mining_for_rpc(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2356
cryptonote::simple_wallet::open_wallet
boost::optional< epee::wipeable_string > open_wallet(const boost::program_options::variables_map &vm)
Definition: simplewallet.cpp:5063
cryptonote::simple_wallet::set_subaddress_lookahead
bool set_subaddress_lookahead(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2904
cryptonote::simple_wallet::refresh_progress_reporter_t::refresh_progress_reporter_t
refresh_progress_reporter_t(cryptonote::simple_wallet &simple_wallet)
Definition: simplewallet.h:362
cryptonote::simple_wallet::mms_delete
void mms_delete(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11124
tools::i_wallet2_callback
Definition: wallet2.h:136
cryptonote::simple_wallet::m_wallet
std::unique_ptr< tools::wallet2 > m_wallet
Definition: simplewallet.h:438
cryptonote::simple_wallet::get_mnemonic_language
std::string get_mnemonic_language()
Gets the word seed language from the user.
Definition: simplewallet.cpp:4767
cryptonote::simple_wallet::on_refresh_finished
void on_refresh_finished(uint64_t start_height, uint64_t fetched_blocks, bool is_init, bool received_money)
Definition: simplewallet.cpp:5729
cryptonote::simple_wallet::import_multisig
bool import_multisig(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1300
cryptonote::simple_wallet::set_refresh_type
bool set_refresh_type(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2629
cryptonote::simple_wallet::check_rpc_payment
bool check_rpc_payment()
Definition: simplewallet.cpp:9156
cryptonote::simple_wallet::sweep_single
bool sweep_single(const std::vector< std::string > &args)
Definition: simplewallet.cpp:7315
cryptonote::simple_wallet::get_random_interval
Definition: simplewallet.h:455
cryptonote::simple_wallet::set_ask_password
bool set_ask_password(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2646
cryptonote::simple_wallet::exchange_multisig_keys
bool exchange_multisig_keys(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1169
cryptonote::simple_wallet::mms_auto_config
void mms_auto_config(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11414
cryptonote::simple_wallet::net_stats
bool net_stats(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2246
cryptonote::simple_wallet::m_rpc_payment_hash_rate
float m_rpc_payment_hash_rate
Definition: simplewallet.h:466
cryptonote::simple_wallet::wallet_info
bool wallet_info(const std::vector< std::string > &args)
Definition: simplewallet.cpp:9847
cryptonote::simple_wallet::mms_next
void mms_next(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10910
cryptonote::simple_wallet::choose_mms_processing
bool choose_mms_processing(const std::vector< mms::processing_data > &data_list, uint32_t &choice)
Definition: simplewallet.cpp:10568
cryptonote::simple_wallet::apropos
bool apropos(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3170
cryptonote::simple_wallet::locked_transfer
bool locked_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:6881
cryptonote::simple_wallet::refresh_main
bool refresh_main(uint64_t start_height, ResetType reset, bool is_init=false)
Definition: simplewallet.cpp:5760
cryptonote::simple_wallet::m_need_payment
std::atomic< bool > m_need_payment
Definition: simplewallet.h:462
cryptonote::simple_wallet::refresh_progress_reporter_t::m_blockchain_height
uint64_t m_blockchain_height
Definition: simplewallet.h:405
cryptonote::simple_wallet::export_transfers
bool export_transfers(const std::vector< std::string > &args)
Definition: simplewallet.cpp:8760
cryptonote::simple_wallet::mms_active
bool mms_active() const
Definition: simplewallet.h:474
cryptonote::simple_wallet::add_signer_config_messages
void add_signer_config_messages()
Definition: simplewallet.cpp:10679
cryptonote::account_public_address
Definition: cryptonote_basic.h:501
cryptonote::simple_wallet::on_empty_command
bool on_empty_command()
Definition: simplewallet.cpp:2324
cryptonote::simple_wallet::export_key_images
bool export_key_images(const std::vector< std::string > &args)
Definition: simplewallet.cpp:9975
cryptonote::simple_wallet::transfer_view
Definition: simplewallet.h:290
cryptonote::simple_wallet::export_outputs
bool export_outputs(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10136
tools::wallet2::signed_tx_set
Definition: wallet2.h:587
cryptonote::simple_wallet::set_tx_note
bool set_tx_note(const std::vector< std::string > &args)
Definition: simplewallet.cpp:9735
cryptonote::simple_wallet::donate
bool donate(const std::vector< std::string > &args)
Definition: simplewallet.cpp:7596
cryptonote::simple_wallet::m_auto_refresh_refreshing
bool m_auto_refresh_refreshing
Definition: simplewallet.h:447
cryptonote::simple_wallet::mms_start_auto_config
void mms_start_auto_config(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11348
cryptonote::simple_wallet::m_refresh_checker
epee::math_helper::once_a_time_seconds_range< get_random_interval< 80 *1000000, 100 *1000000 > > m_refresh_checker
Definition: simplewallet.h:458
cryptonote::simple_wallet::get_description
bool get_description(const std::vector< std::string > &args)
Definition: simplewallet.cpp:9804
cryptonote::simple_wallet::on_device_passphrase_request
virtual boost::optional< epee::wipeable_string > on_device_passphrase_request(bool &on_device)
Definition: simplewallet.cpp:5710
cryptonote::simple_wallet::process_ring_members
bool process_ring_members(const std::vector< tools::wallet2::pending_tx > &ptx_vector, std::ostream &ostr, bool verbose)
Definition: simplewallet.cpp:6215
cryptonote::simple_wallet::hw_reconnect
bool hw_reconnect(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10111
cryptonote::simple_wallet::m_non_deterministic
bool m_non_deterministic
Definition: simplewallet.h:429
cryptonote::simple_wallet::mms_config_checksum
void mms_config_checksum(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11386
cryptonote::simple_wallet::sweep_unmixable
bool sweep_unmixable(const std::vector< std::string > &args)
Definition: simplewallet.cpp:6894
cryptonote::transaction
Definition: cryptonote_basic.h:194
cryptonote::simple_wallet::on_get_password
virtual boost::optional< epee::wipeable_string > on_get_password(const char *reason)
Definition: simplewallet.cpp:5670
cryptonote::simple_wallet::cold_sign_tx
bool cold_sign_tx(const std::vector< tools::wallet2::pending_tx > &ptx_vector, tools::wallet2::signed_tx_set &exported_txs, std::vector< cryptonote::address_parse_info > &dsts_info, std::function< bool(const tools::wallet2::signed_tx_set &)> accept_func)
Definition: simplewallet.cpp:2335
cryptonote::simple_wallet::on_device_button_request
virtual void on_device_button_request(uint64_t code)
Definition: simplewallet.cpp:5696
cryptonote::simple_wallet::version
bool version(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2310
cryptonote::simple_wallet::refresh_progress_reporter_t::m_blockchain_height_update_time
std::chrono::system_clock::time_point m_blockchain_height_update_time
Definition: simplewallet.h:406
cryptonote::simple_wallet::on_money_spent
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, const cryptonote::subaddress_index &subaddr_index)
Definition: simplewallet.cpp:5649
cryptonote::simple_wallet::transfer_view::confirmed
bool confirmed
Definition: simplewallet.h:295
cryptonote::simple_wallet::set_min_output_count
bool set_min_output_count(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2708
DIFFICULTY_TARGET_V1
#define DIFFICULTY_TARGET_V1
Definition: cryptonote_config.h:80
cryptonote::simple_wallet::unblackball
bool unblackball(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2100
cryptonote::simple_wallet::export_raw_multisig
bool export_raw_multisig(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1597
cryptonote::simple_wallet::save_known_rings
bool save_known_rings(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2157
cryptonote::simple_wallet::help
bool help(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:3125
cryptonote::simple_wallet::mms_transfer
void mms_transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11118
cryptonote::simple_wallet::m_generate_from_device
std::string m_generate_from_device
Definition: simplewallet.h:413
cryptonote::simple_wallet::get_number_from_arg
bool get_number_from_arg(const std::string &arg, uint32_t &number, const uint32_t lower_bound, const uint32_t upper_bound)
Definition: simplewallet.cpp:10554
cryptonote::simple_wallet::set_unit
bool set_unit(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2678
cryptonote::simple_wallet::m_wallet_file
std::string m_wallet_file
Definition: simplewallet.h:411
cryptonote::simple_wallet::unset_ring
bool unset_ring(const std::vector< std::string > &args)
Definition: simplewallet.cpp:1908
tools::wallet2::multisig_tx_set
Definition: wallet2.h:601
cryptonote::simple_wallet::blackball
bool blackball(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2011
cryptonote::simple_wallet::thaw
bool thaw(const std::vector< std::string > &args)
Definition: simplewallet.cpp:2205
cryptonote::simple_wallet::accept_loaded_tx
bool accept_loaded_tx(const tools::wallet2::multisig_tx_set &txs)
Definition: simplewallet.cpp:1389
cryptonote::simple_wallet::set_variable
bool set_variable(const std::vector< std::string > &args)
Definition: simplewallet.cpp:3751
cryptonote::simple_wallet::get_multisig_wallet_state
mms::multisig_wallet_state get_multisig_wallet_state() const
Definition: simplewallet.h:473
cryptonote::simple_wallet::set_confirm_backlog
bool set_confirm_backlog(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2757
cryptonote::simple_wallet::transfer
bool transfer(const std::vector< std::string > &args)
Definition: simplewallet.cpp:6875
cryptonote::simple_wallet::rescan_spent
bool rescan_spent(const std::vector< std::string > &args)
Definition: simplewallet.cpp:6136
cryptonote::simple_wallet::on_command
bool on_command(bool(simple_wallet::*cmd)(const std::vector< std::string > &), const std::vector< std::string > &args)
Definition: simplewallet.cpp:6412
cryptonote::simple_wallet::status
bool status(const std::vector< std::string > &args)
Definition: simplewallet.cpp:9821
cryptonote::simple_wallet::set_inactivity_lock_timeout
bool set_inactivity_lock_timeout(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2999
cryptonote::simple_wallet::try_connect_to_daemon
bool try_connect_to_daemon(bool silent=false, uint32_t *version=nullptr)
Definition: simplewallet.cpp:4738
crypto.h
cryptonote::simple_wallet::mms_info
void mms_info(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10826
cryptonote::simple_wallet::process_command
bool process_command(const std::vector< std::string > &args)
Definition: simplewallet.cpp:10375
cryptonote::simple_wallet::refresh_progress_reporter_t
Definition: simplewallet.h:360
cryptonote::simple_wallet::mms_stop_auto_config
void mms_stop_auto_config(const std::vector< std::string > &args)
Definition: simplewallet.cpp:11398
cryptonote::simple_wallet::m_idle_cond
boost::condition_variable m_idle_cond
Definition: simplewallet.h:444
cryptonote::simple_wallet::close_wallet
bool close_wallet()
Definition: simplewallet.cpp:5167
cryptonote::simple_wallet::get_daemon_blockchain_height
uint64_t get_daemon_blockchain_height(std::string &err)
Definition: simplewallet.cpp:6113
cryptonote::simple_wallet::check_for_inactivity_lock
void check_for_inactivity_lock(bool user)
Definition: simplewallet.cpp:6365
cryptonote::simple_wallet::seed_set_language
bool seed_set_language(const std::vector< std::string > &args=std::vector< std::string >())
Sets seed language.
Definition: simplewallet.cpp:846
cryptonote::simple_wallet::set_print_ring_members
bool set_print_ring_members(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2469
cryptonote::simple_wallet::m_use_english_language_names
bool m_use_english_language_names
Definition: simplewallet.h:434
cryptonote::simple_wallet::transfer_view::outputs
std::vector< std::pair< std::string, uint64_t > > outputs
Definition: simplewallet.h:300
i18n_translate
const char * i18n_translate(const char *s, const std::string &context)
Definition: i18n.cpp:321
wallet2.h
cryptonote::simple_wallet::set_export_format
bool set_export_format(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:3074
cryptonote::simple_wallet::set_confirm_backlog_threshold
bool set_confirm_backlog_threshold(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:2770
cryptonote::simple_wallet::refresh_progress_reporter_t::update_blockchain_height
void update_blockchain_height()
Definition: simplewallet.h:388
crypto::hash
POD_CLASS hash
Definition: hash.h:48
cryptonote::simple_wallet::seed
bool seed(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:830
cryptonote::simple_wallet::set_setup_background_mining
bool set_setup_background_mining(const std::vector< std::string > &args=std::vector< std::string >())
Definition: simplewallet.cpp:3022
cryptonote::simple_wallet::m_last_activity_time
std::atomic< time_t > m_last_activity_time
Definition: simplewallet.h:451
cryptonote::simple_wallet::transfer_view::type
std::string type
Definition: simplewallet.h:291