Electroneum
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
tools::wallet2 Class Reference

#include <wallet2.h>

Collaboration diagram for tools::wallet2:
Collaboration graph
[legend]

Classes

struct  address_book_row
 
struct  address_tx
 
struct  cache_file_data
 
struct  confirmed_transfer_details
 
struct  is_out_data
 
struct  keys_file_data
 
struct  multisig_info
 
struct  multisig_sig
 
struct  multisig_tx_set
 
struct  parsed_block
 
struct  payment_details
 
struct  pending_tx
 
struct  pool_payment_details
 
struct  reserve_proof_entry
 
struct  signed_tx_set
 
struct  transfer_details
 
struct  tx_cache_data
 
struct  tx_construction_data
 
struct  tx_scan_info_t
 
struct  unconfirmed_transfer_details
 
struct  unsigned_tx_set
 

Public Types

enum  RefreshType { RefreshFull , RefreshOptimizeCoinbase , RefreshNoCoinbase , RefreshDefault = RefreshOptimizeCoinbase }
 
enum  AskPasswordType { AskPasswordNever = 0 , AskPasswordOnAction = 1 , AskPasswordToDecrypt = 2 }
 
enum  BackgroundMiningSetupType { BackgroundMiningMaybe = 0 , BackgroundMiningYes = 1 , BackgroundMiningNo = 2 }
 
typedef std::vector< transfer_detailstransfer_container
 
typedef std::unordered_multimap< crypto::hash, payment_detailspayment_container
 
typedef std::tuple< uint64_t, crypto::public_key, rct::keyget_outs_entry
 

Public Member Functions

 wallet2 (cryptonote::network_type nettype=cryptonote::MAINNET, uint64_t kdf_rounds=1, bool unattended=false)
 
 ~wallet2 ()
 
void generate (const std::string &wallet_, const epee::wipeable_string &password, const epee::wipeable_string &multisig_data, bool create_address_file=false)
 Generates a wallet or restores one. More...
 
crypto::secret_key generate (const std::string &wallet, const epee::wipeable_string &password, const crypto::secret_key &recovery_param=crypto::secret_key(), bool recover=false, bool two_random=false, bool create_address_file=false)
 Generates a wallet or restores one. More...
 
void generate (const std::string &wallet, const epee::wipeable_string &password, const cryptonote::account_public_address &account_public_address, const crypto::secret_key &spendkey, const crypto::secret_key &viewkey, bool create_address_file=false)
 Creates a wallet from a public address and a spend/view secret key pair. More...
 
void generate (const std::string &wallet, const epee::wipeable_string &password, const cryptonote::account_public_address &account_public_address, const crypto::secret_key &viewkey=crypto::secret_key(), bool create_address_file=false)
 Creates a watch only wallet from a public address and a view secret key. More...
 
void restore (const std::string &wallet_, const epee::wipeable_string &password, const std::string &device_name, bool create_address_file=false)
 Restore a wallet hold by an HW. More...
 
std::string make_multisig (const epee::wipeable_string &password, const std::vector< std::string > &info, uint32_t threshold)
 Creates a multisig wallet. More...
 
std::string make_multisig (const epee::wipeable_string &password, const std::vector< crypto::secret_key > &view_keys, const std::vector< crypto::public_key > &spend_keys, uint32_t threshold)
 Creates a multisig wallet. More...
 
std::string exchange_multisig_keys (const epee::wipeable_string &password, const std::vector< std::string > &info)
 
std::string exchange_multisig_keys (const epee::wipeable_string &password, std::unordered_set< crypto::public_key > pkeys, std::vector< crypto::public_key > signers)
 Any but first round of keys exchange. More...
 
bool finalize_multisig (const epee::wipeable_string &password, const std::vector< std::string > &info)
 Finalizes creation of a multisig wallet. More...
 
bool finalize_multisig (const epee::wipeable_string &password, const std::unordered_set< crypto::public_key > &pkeys, std::vector< crypto::public_key > signers)
 Finalizes creation of a multisig wallet. More...
 
std::string get_multisig_info () const
 
cryptonote::blobdata export_multisig ()
 
size_t import_multisig (std::vector< cryptonote::blobdata > info)
 
void rewrite (const std::string &wallet_name, const epee::wipeable_string &password)
 Rewrites to the wallet file for wallet upgrade (doesn't generate key, assumes it's already there) More...
 
void write_watch_only_wallet (const std::string &wallet_name, const epee::wipeable_string &password, std::string &new_keys_filename)
 Writes to a file named based on the normal wallet (doesn't generate key, assumes it's already there) More...
 
void load (const std::string &wallet, const epee::wipeable_string &password)
 
void store ()
 
void store_to (const std::string &path, const epee::wipeable_string &password)
 store_to Stores wallet to another file(s), deleting old ones More...
 
std::string path () const
 
bool verify_password (const epee::wipeable_string &password)
 verifies given password is correct for default wallet keys file More...
 
cryptonote::account_baseget_account ()
 
const cryptonote::account_baseget_account () const
 
void encrypt_keys (const crypto::chacha_key &key)
 
void encrypt_keys (const epee::wipeable_string &password)
 
void decrypt_keys (const crypto::chacha_key &key)
 
void decrypt_keys (const epee::wipeable_string &password)
 
void set_refresh_from_block_height (uint64_t height)
 
uint64_t get_refresh_from_block_height () const
 
void explicit_refresh_from_block_height (bool expl)
 
bool explicit_refresh_from_block_height () const
 
bool deinit ()
 
bool init (std::string daemon_address="http://localhost:8080", boost::optional< epee::net_utils::http::login > daemon_login=boost::none, boost::asio::ip::tcp::endpoint proxy={}, uint64_t upper_transaction_weight_limit=0, bool trusted_daemon=true, epee::net_utils::ssl_options_t ssl_options=epee::net_utils::ssl_support_t::e_ssl_support_autodetect, std::string blockchain_db_path="")
 
bool set_daemon (std::string daemon_address="http://localhost:8080", boost::optional< epee::net_utils::http::login > daemon_login=boost::none, bool trusted_daemon=true, epee::net_utils::ssl_options_t ssl_options=epee::net_utils::ssl_support_t::e_ssl_support_autodetect)
 
void stop ()
 
i_wallet2_callbackcallback () const
 
void callback (i_wallet2_callback *callback)
 
bool is_trusted_daemon () const
 
void set_trusted_daemon (bool trusted)
 
bool is_deterministic () const
 Checks if deterministic wallet. More...
 
bool get_seed (epee::wipeable_string &electrum_words, const epee::wipeable_string &passphrase=epee::wipeable_string()) const
 
bool light_wallet () const
 Checks if light wallet. A light wallet sends view key to a server where the blockchain is scanned. More...
 
void set_light_wallet (bool light_wallet)
 
uint64_t get_light_wallet_scanned_block_height () const
 
uint64_t get_light_wallet_blockchain_height () const
 
const std::string & get_seed_language () const
 Gets the seed language. More...
 
void set_seed_language (const std::string &language)
 Sets the seed language. More...
 
cryptonote::account_public_address get_subaddress (const cryptonote::subaddress_index &index) const
 
cryptonote::account_public_address get_address () const
 
boost::optional< cryptonote::subaddress_indexget_subaddress_index (const cryptonote::account_public_address &address) const
 
crypto::public_key get_subaddress_spend_public_key (const cryptonote::subaddress_index &index) const
 
std::vector< crypto::public_keyget_subaddress_spend_public_keys (uint32_t account, uint32_t begin, uint32_t end) const
 
std::string get_subaddress_as_str (const cryptonote::subaddress_index &index) const
 
std::string get_address_as_str () const
 
std::string get_integrated_address_as_str (const crypto::hash8 &payment_id) const
 
void add_subaddress_account (const std::string &label, const bool update_account_tags=true)
 
size_t get_num_subaddress_accounts () const
 
size_t get_num_subaddresses (uint32_t index_major) const
 
void add_subaddress (uint32_t index_major, const std::string &label)
 
void expand_subaddresses (const cryptonote::subaddress_index &index, const bool udpate_account_tags=true)
 
std::string get_subaddress_label (const cryptonote::subaddress_index &index) const
 
void set_subaddress_label (const cryptonote::subaddress_index &index, const std::string &label)
 
void set_subaddress_lookahead (size_t major, size_t minor)
 
std::pair< size_t, size_t > get_subaddress_lookahead () const
 
void account_major_offset (uint32_t offset)
 
uint32_t account_major_offset () const
 
bool is_deprecated () const
 Tells if the wallet file is deprecated. More...
 
void refresh (bool trusted_daemon)
 
void refresh (bool trusted_daemon, uint64_t start_height, uint64_t &blocks_fetched)
 
void refresh (bool trusted_daemon, uint64_t start_height, uint64_t &blocks_fetched, bool &received_money, bool check_pool=true)
 
bool refresh (bool trusted_daemon, uint64_t &blocks_fetched, bool &received_money, bool &ok)
 
void set_refresh_type (RefreshType refresh_type)
 
RefreshType get_refresh_type () const
 
cryptonote::network_type nettype () const
 
bool watch_only () const
 
bool multisig (bool *ready=NULL, uint32_t *threshold=NULL, uint32_t *total=NULL) const
 
bool has_multisig_partial_key_images () const
 
bool has_unknown_key_images () const
 
bool get_multisig_seed (epee::wipeable_string &seed, const epee::wipeable_string &passphrase=std::string(), bool raw=true) const
 
bool key_on_device () const
 
hw::device::device_type get_device_type () const
 
bool reconnect_device ()
 
uint64_t balance (uint32_t subaddr_index_major) const
 
uint64_t unlocked_balance (uint32_t subaddr_index_major, uint64_t *blocks_to_unlock=NULL) const
 
std::map< uint32_t, uint64_t > balance_per_subaddress (uint32_t subaddr_index_major) const
 
std::map< uint32_t, std::pair< uint64_t, uint64_t > > unlocked_balance_per_subaddress (uint32_t subaddr_index_major) const
 
uint64_t balance_all () const
 
uint64_t unlocked_balance_all (uint64_t *blocks_to_unlock=NULL) const
 
template<typename T >
void transfer_selected (const std::vector< cryptonote::tx_destination_entry > &dsts, const std::vector< size_t > &selected_transfers, size_t fake_outputs_count, std::vector< std::vector< tools::wallet2::get_outs_entry >> &outs, uint64_t unlock_time, uint64_t fee, const std::vector< uint8_t > &extra, T destination_split_strategy, const tx_dust_policy &dust_policy, cryptonote::transaction &tx, pending_tx &ptx)
 
void transfer_selected_rct (std::vector< cryptonote::tx_destination_entry > dsts, const std::vector< size_t > &selected_transfers, size_t fake_outputs_count, std::vector< std::vector< tools::wallet2::get_outs_entry >> &outs, uint64_t unlock_time, uint64_t fee, const std::vector< uint8_t > &extra, cryptonote::transaction &tx, pending_tx &ptx, const rct::RCTConfig &rct_config)
 
void commit_tx (pending_tx &ptx_vector)
 
void commit_tx (std::vector< pending_tx > &ptx_vector)
 
bool save_tx (const std::vector< pending_tx > &ptx_vector, const std::string &filename) const
 
std::string dump_tx_to_str (const std::vector< pending_tx > &ptx_vector) const
 
std::string save_multisig_tx (multisig_tx_set txs)
 
bool save_multisig_tx (const multisig_tx_set &txs, const std::string &filename)
 
std::string save_multisig_tx (const std::vector< pending_tx > &ptx_vector)
 
bool save_multisig_tx (const std::vector< pending_tx > &ptx_vector, const std::string &filename)
 
multisig_tx_set make_multisig_tx_set (const std::vector< pending_tx > &ptx_vector) const
 
bool sign_tx (const std::string &unsigned_filename, const std::string &signed_filename, std::vector< wallet2::pending_tx > &ptx, std::function< bool(const unsigned_tx_set &)> accept_func=NULL, bool export_raw=false)
 
bool sign_tx (unsigned_tx_set &exported_txs, const std::string &signed_filename, std::vector< wallet2::pending_tx > &ptx, bool export_raw=false)
 
bool sign_tx (unsigned_tx_set &exported_txs, std::vector< wallet2::pending_tx > &ptx, signed_tx_set &signed_txs)
 
std::string sign_tx_dump_to_str (unsigned_tx_set &exported_txs, std::vector< wallet2::pending_tx > &ptx, signed_tx_set &signed_txes)
 
bool load_unsigned_tx (const std::string &unsigned_filename, unsigned_tx_set &exported_txs) const
 
bool parse_unsigned_tx_from_str (const std::string &unsigned_tx_st, unsigned_tx_set &exported_txs) const
 
bool load_tx (const std::string &signed_filename, std::vector< tools::wallet2::pending_tx > &ptx, std::function< bool(const signed_tx_set &)> accept_func=NULL)
 
bool parse_tx_from_str (const std::string &signed_tx_st, std::vector< tools::wallet2::pending_tx > &ptx, std::function< bool(const signed_tx_set &)> accept_func)
 
std::vector< wallet2::pending_txcreate_transactions_2 (std::vector< cryptonote::tx_destination_entry > dsts, const size_t fake_outs_count, const uint64_t unlock_time, uint32_t priority, const std::vector< uint8_t > &extra, uint32_t subaddr_account, std::set< uint32_t > subaddr_indices)
 
std::vector< wallet2::pending_txcreate_transactions_all (uint64_t below, const cryptonote::account_public_address &address, bool is_subaddress, const size_t outputs, const size_t fake_outs_count, const uint64_t unlock_time, uint32_t priority, const std::vector< uint8_t > &extra, uint32_t subaddr_account, std::set< uint32_t > subaddr_indices)
 
std::vector< wallet2::pending_txcreate_transactions_single (const crypto::key_image &ki, const cryptonote::account_public_address &address, bool is_subaddress, const size_t outputs, const size_t fake_outs_count, const uint64_t unlock_time, uint32_t priority, const std::vector< uint8_t > &extra)
 
std::vector< wallet2::pending_txcreate_transactions_from (const cryptonote::account_public_address &address, bool is_subaddress, const size_t outputs, std::vector< size_t > unused_transfers_indices, std::vector< size_t > unused_dust_indices, const size_t fake_outs_count, const uint64_t unlock_time, uint32_t priority, const std::vector< uint8_t > &extra)
 
bool sanity_check (const std::vector< wallet2::pending_tx > &ptx_vector, std::vector< cryptonote::tx_destination_entry > dsts) const
 
void cold_tx_aux_import (const std::vector< pending_tx > &ptx, const std::vector< std::string > &tx_device_aux)
 
void cold_sign_tx (const std::vector< pending_tx > &ptx_vector, signed_tx_set &exported_txs, std::vector< cryptonote::address_parse_info > &dsts_info, std::vector< std::string > &tx_device_aux)
 
uint64_t cold_key_image_sync (uint64_t &spent, uint64_t &unspent)
 
bool parse_multisig_tx_from_str (std::string multisig_tx_st, multisig_tx_set &exported_txs) const
 
bool load_multisig_tx (cryptonote::blobdata blob, multisig_tx_set &exported_txs, std::function< bool(const multisig_tx_set &)> accept_func=NULL)
 
bool load_multisig_tx_from_file (const std::string &filename, multisig_tx_set &exported_txs, std::function< bool(const multisig_tx_set &)> accept_func=NULL)
 
bool sign_multisig_tx_from_file (const std::string &filename, std::vector< crypto::hash > &txids, std::function< bool(const multisig_tx_set &)> accept_func)
 
bool sign_multisig_tx (multisig_tx_set &exported_txs, std::vector< crypto::hash > &txids)
 
bool sign_multisig_tx_to_file (multisig_tx_set &exported_txs, const std::string &filename, std::vector< crypto::hash > &txids)
 
std::vector< pending_txcreate_unmixable_sweep_transactions ()
 
void discard_unmixable_outputs ()
 
bool check_connection (uint32_t *version=NULL, bool *ssl=NULL, uint32_t timeout=200000)
 
void get_transfers (wallet2::transfer_container &incoming_transfers) const
 
void get_payments (const crypto::hash &payment_id, std::list< wallet2::payment_details > &payments, uint64_t min_height=0, const boost::optional< uint32_t > &subaddr_account=boost::none, const std::set< uint32_t > &subaddr_indices={}) const
 
void get_payments (std::list< std::pair< crypto::hash, wallet2::payment_details >> &payments, uint64_t min_height, uint64_t max_height=(uint64_t) -1, const boost::optional< uint32_t > &subaddr_account=boost::none, const std::set< uint32_t > &subaddr_indices={}) const
 
void get_payments_out (std::list< std::pair< crypto::hash, wallet2::confirmed_transfer_details >> &confirmed_payments, uint64_t min_height, uint64_t max_height=(uint64_t) -1, const boost::optional< uint32_t > &subaddr_account=boost::none, const std::set< uint32_t > &subaddr_indices={}) const
 
void get_unconfirmed_payments_out (std::list< std::pair< crypto::hash, wallet2::unconfirmed_transfer_details >> &unconfirmed_payments, const boost::optional< uint32_t > &subaddr_account=boost::none, const std::set< uint32_t > &subaddr_indices={}) const
 
void get_unconfirmed_payments (std::list< std::pair< crypto::hash, wallet2::pool_payment_details >> &unconfirmed_payments, const boost::optional< uint32_t > &subaddr_account=boost::none, const std::set< uint32_t > &subaddr_indices={}) const
 
uint64_t get_blockchain_current_height () const
 
void rescan_spent ()
 
void rescan_blockchain (bool hard, bool refresh=true, bool keep_key_images=false)
 
bool is_transfer_unlocked (const transfer_details &td) const
 
bool is_transfer_unlocked (uint64_t unlock_time, uint64_t block_height) const
 
uint64_t get_last_block_reward () const
 
uint64_t get_device_last_key_image_sync () const
 
template<class t_archive >
void serialize (t_archive &a, const unsigned int ver)
 
bool always_confirm_transfers () const
 
void always_confirm_transfers (bool always)
 
bool print_ring_members () const
 
void print_ring_members (bool value)
 
bool store_tx_info () const
 
void store_tx_info (bool store)
 
uint32_t default_mixin () const
 
void default_mixin (uint32_t m)
 
uint32_t get_default_priority () const
 
void set_default_priority (uint32_t p)
 
bool auto_refresh () const
 
void auto_refresh (bool r)
 
bool confirm_missing_payment_id () const
 
void confirm_missing_payment_id (bool always)
 
AskPasswordType ask_password () const
 
void ask_password (AskPasswordType ask)
 
void set_min_output_count (uint32_t count)
 
uint32_t get_min_output_count () const
 
void set_min_output_value (uint64_t value)
 
uint64_t get_min_output_value () const
 
void merge_destinations (bool merge)
 
bool merge_destinations () const
 
bool confirm_backlog () const
 
void confirm_backlog (bool always)
 
void set_confirm_backlog_threshold (uint32_t threshold)
 
uint32_t get_confirm_backlog_threshold () const
 
bool confirm_export_overwrite () const
 
void confirm_export_overwrite (bool always)
 
bool auto_low_priority () const
 
void auto_low_priority (bool value)
 
bool segregate_pre_fork_outputs () const
 
void segregate_pre_fork_outputs (bool value)
 
bool key_reuse_mitigation2 () const
 
void key_reuse_mitigation2 (bool value)
 
uint64_t segregation_height () const
 
void segregation_height (uint64_t height)
 
bool ignore_fractional_outputs () const
 
void ignore_fractional_outputs (bool value)
 
bool confirm_non_default_ring_size () const
 
void confirm_non_default_ring_size (bool always)
 
bool track_uses () const
 
void track_uses (bool value)
 
BackgroundMiningSetupType setup_background_mining () const
 
void setup_background_mining (BackgroundMiningSetupType value)
 
const std::string & device_name () const
 
void device_name (const std::string &device_name)
 
const std::string & device_derivation_path () const
 
void device_derivation_path (const std::string &device_derivation_path)
 
bool get_tx_key_cached (const crypto::hash &txid, crypto::secret_key &tx_key, std::vector< crypto::secret_key > &additional_tx_keys) const
 
void set_tx_key (const crypto::hash &txid, const crypto::secret_key &tx_key, const std::vector< crypto::secret_key > &additional_tx_keys)
 
bool get_tx_key (const crypto::hash &txid, crypto::secret_key &tx_key, std::vector< crypto::secret_key > &additional_tx_keys)
 
void check_tx_key (const crypto::hash &txid, const crypto::secret_key &tx_key, const std::vector< crypto::secret_key > &additional_tx_keys, const cryptonote::account_public_address &address, uint64_t &received, bool &in_pool, uint64_t &confirmations)
 
void check_tx_key_helper (const crypto::hash &txid, const crypto::key_derivation &derivation, const std::vector< crypto::key_derivation > &additional_derivations, const cryptonote::account_public_address &address, uint64_t &received, bool &in_pool, uint64_t &confirmations)
 
void check_tx_key_helper (const cryptonote::transaction &tx, const crypto::key_derivation &derivation, const std::vector< crypto::key_derivation > &additional_derivations, const cryptonote::account_public_address &address, uint64_t &received) const
 
std::string get_tx_proof (const crypto::hash &txid, const cryptonote::account_public_address &address, bool is_subaddress, const std::string &message)
 
std::string get_tx_proof (const cryptonote::transaction &tx, const crypto::secret_key &tx_key, const std::vector< crypto::secret_key > &additional_tx_keys, const cryptonote::account_public_address &address, bool is_subaddress, const std::string &message) const
 
bool check_tx_proof (const crypto::hash &txid, const cryptonote::account_public_address &address, bool is_subaddress, const std::string &message, const std::string &sig_str, uint64_t &received, bool &in_pool, uint64_t &confirmations)
 
bool check_tx_proof (const cryptonote::transaction &tx, const cryptonote::account_public_address &address, bool is_subaddress, const std::string &message, const std::string &sig_str, uint64_t &received) const
 
std::string get_spend_proof (const crypto::hash &txid, const std::string &message)
 
bool check_spend_proof (const crypto::hash &txid, const std::string &message, const std::string &sig_str)
 
std::string get_reserve_proof (const boost::optional< std::pair< uint32_t, uint64_t >> &account_minreserve, const std::string &message)
 Generates a proof that proves the reserve of unspent funds. More...
 
bool check_reserve_proof (const cryptonote::account_public_address &address, const std::string &message, const std::string &sig_str, uint64_t &total, uint64_t &spent)
 Verifies a proof of reserve. More...
 
std::vector< address_book_rowget_address_book () const
 GUI Address book get/store. More...
 
bool add_address_book_row (const cryptonote::account_public_address &address, const crypto::hash &payment_id, const std::string &description, bool is_subaddress)
 
bool delete_address_book_row (std::size_t row_id)
 
uint64_t get_num_rct_outputs ()
 
size_t get_num_transfer_details () const
 
const transfer_detailsget_transfer_details (size_t idx) const
 
void get_hard_fork_info (uint8_t version, uint64_t &earliest_height) const
 
bool use_fork_rules (uint8_t version, int64_t early_blocks=0) const
 
int get_fee_algorithm () const
 
std::string get_wallet_file () const
 
std::string get_keys_file () const
 
std::string get_daemon_address () const
 
const boost::optional< epee::net_utils::http::login > & get_daemon_login () const
 
uint64_t get_daemon_blockchain_height (std::string &err) const
 
uint64_t get_daemon_blockchain_target_height (std::string &err)
 
uint64_t get_approximate_blockchain_height () const
 Calculates the approximate blockchain height from current date/time. More...
 
uint64_t estimate_blockchain_height ()
 
std::vector< size_t > select_available_outputs_from_histogram (uint64_t count, bool atleast, bool unlocked, bool allow_rct)
 
std::vector< size_t > select_available_outputs (const std::function< bool(const transfer_details &td)> &f) const
 
std::vector< size_t > select_available_unmixable_outputs ()
 
std::vector< size_t > select_available_mixable_outputs ()
 
size_t pop_best_value_from (const transfer_container &transfers, std::vector< size_t > &unused_dust_indices, const std::vector< size_t > &selected_transfers, bool smallest=false) const
 
size_t pop_best_value (std::vector< size_t > &unused_dust_indices, const std::vector< size_t > &selected_transfers, bool smallest=false) const
 
void set_tx_note (const crypto::hash &txid, const std::string &note)
 
std::string get_tx_note (const crypto::hash &txid) const
 
void set_tx_device_aux (const crypto::hash &txid, const std::string &aux)
 
std::string get_tx_device_aux (const crypto::hash &txid) const
 
void set_description (const std::string &description)
 
std::string get_description () const
 
const std::pair< std::map< std::string, std::string >, std::vector< std::string > > & get_account_tags ()
 Get the list of registered account tags. More...
 
void set_account_tag (const std::set< uint32_t > &account_indices, const std::string &tag)
 Set a tag to the given accounts. More...
 
void set_account_tag_description (const std::string &tag, const std::string &description)
 Set the label of the given tag. More...
 
std::string sign (const std::string &data) const
 
bool verify (const std::string &data, const cryptonote::account_public_address &address, const std::string &signature) const
 
std::string sign_multisig_participant (const std::string &data) const
 sign_multisig_participant signs given message with the multisig public signer key More...
 
bool verify_with_public_key (const std::string &data, const crypto::public_key &public_key, const std::string &signature) const
 verify_with_public_key verifies message was signed with given public key More...
 
std::pair< size_t, std::vector< tools::wallet2::transfer_details > > export_outputs (bool all=false) const
 
std::string export_outputs_to_str (bool all=false) const
 
size_t import_outputs (const std::pair< size_t, std::vector< tools::wallet2::transfer_details >> &outputs)
 
size_t import_outputs_from_str (const std::string &outputs_st)
 
payment_container export_payments () const
 
void import_payments (const payment_container &payments)
 
void import_payments_out (const std::list< std::pair< crypto::hash, wallet2::confirmed_transfer_details >> &confirmed_payments)
 
std::tuple< size_t, crypto::hash, std::vector< crypto::hash > > export_blockchain () const
 
void import_blockchain (const std::tuple< size_t, crypto::hash, std::vector< crypto::hash >> &bc)
 
bool export_key_images (const std::string &filename) const
 
std::pair< size_t, std::vector< std::pair< crypto::key_image, crypto::signature > > > export_key_images (bool all=false) const
 
uint64_t import_key_images (const std::vector< std::pair< crypto::key_image, crypto::signature >> &signed_key_images, size_t offset, uint64_t &spent, uint64_t &unspent, bool check_spent=true)
 
uint64_t import_key_images (const std::string &filename, uint64_t &spent, uint64_t &unspent)
 
bool import_key_images (std::vector< crypto::key_image > key_images, size_t offset=0, boost::optional< std::unordered_set< size_t >> selected_transfers=boost::none)
 
bool import_key_images (signed_tx_set &signed_tx, size_t offset=0, bool only_selected_transfers=false)
 
crypto::public_key get_tx_pub_key_from_received_outs (const tools::wallet2::transfer_details &td) const
 
void update_pool_state (bool refreshed=false)
 
void remove_obsolete_pool_txs (const std::vector< crypto::hash > &tx_hashes)
 
std::string encrypt (const char *plaintext, size_t len, const crypto::secret_key &skey, bool authenticated=true) const
 
std::string encrypt (const epee::span< char > &span, const crypto::secret_key &skey, bool authenticated=true) const
 
std::string encrypt (const std::string &plaintext, const crypto::secret_key &skey, bool authenticated=true) const
 
std::string encrypt (const epee::wipeable_string &plaintext, const crypto::secret_key &skey, bool authenticated=true) const
 
std::string encrypt_with_view_secret_key (const std::string &plaintext, bool authenticated=true) const
 
template<typename T = std::string>
T decrypt (const std::string &ciphertext, const crypto::secret_key &skey, bool authenticated=true) const
 
std::string decrypt_with_view_secret_key (const std::string &ciphertext, bool authenticated=true) const
 
std::string make_uri (const std::string &address, const std::string &payment_id, uint64_t amount, const std::string &tx_description, const std::string &recipient_name, std::string &error) const
 
bool parse_uri (const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector< std::string > &unknown_parameters, std::string &error)
 
uint64_t get_blockchain_height_by_date (uint16_t year, uint8_t month, uint8_t day)
 
bool is_synced () const
 
std::vector< std::pair< uint64_t, uint64_t > > estimate_backlog (const std::vector< std::pair< double, double >> &fee_levels)
 
std::vector< std::pair< uint64_t, uint64_t > > estimate_backlog (uint64_t min_tx_weight, uint64_t max_tx_weight, const std::vector< uint64_t > &fees)
 
uint64_t get_fee_multiplier (uint32_t priority, int fee_algorithm=-1) const
 
uint64_t get_base_fee () const
 
uint64_t get_fee_quantization_mask () const
 
uint64_t get_min_ring_size () const
 
uint64_t get_max_ring_size () const
 
uint64_t adjust_mixin (uint64_t mixin) const
 
uint32_t adjust_priority (uint32_t priority)
 
bool is_unattended () const
 
void light_wallet_get_unspent_outs ()
 
void light_wallet_get_address_txs ()
 
bool light_wallet_get_address_info (tools::COMMAND_RPC_GET_ADDRESS_INFO::response &response)
 
bool light_wallet_login (bool &new_address)
 
bool light_wallet_import_wallet_request (tools::COMMAND_RPC_IMPORT_WALLET_REQUEST::response &response)
 
void light_wallet_get_outs (std::vector< std::vector< get_outs_entry >> &outs, const std::vector< size_t > &selected_transfers, size_t fake_outputs_count)
 
bool light_wallet_parse_rct_str (const std::string &rct_string, const crypto::public_key &tx_pub_key, uint64_t internal_output_index, rct::key &decrypted_mask, rct::key &rct_commit, bool decrypt) const
 
bool light_wallet_key_image_is_ours (const crypto::key_image &key_image, const crypto::public_key &tx_public_key, uint64_t out_index)
 
void set_attribute (const std::string &key, const std::string &value)
 
std::string get_attribute (const std::string &key) const
 
crypto::public_key get_multisig_signer_public_key (const crypto::secret_key &spend_skey) const
 
crypto::public_key get_multisig_signer_public_key () const
 
crypto::public_key get_multisig_signing_public_key (size_t idx) const
 
crypto::public_key get_multisig_signing_public_key (const crypto::secret_key &skey) const
 
template<class t_request , class t_response >
bool invoke_http_json (const boost::string_ref uri, const t_request &req, t_response &res, std::chrono::milliseconds timeout=std::chrono::seconds(15), const boost::string_ref http_method="GET")
 
template<class t_request , class t_response >
bool invoke_http_bin (const boost::string_ref uri, const t_request &req, t_response &res, std::chrono::milliseconds timeout=std::chrono::seconds(15), const boost::string_ref http_method="GET")
 
template<class t_request , class t_response >
bool invoke_http_json_rpc (const boost::string_ref uri, const std::string &method_name, const t_request &req, t_response &res, std::chrono::milliseconds timeout=std::chrono::seconds(15), const boost::string_ref http_method="GET", const std::string &req_id="0")
 
bool set_ring_database (const std::string &filename)
 
const std::string get_ring_database () const
 
bool get_ring (const crypto::key_image &key_image, std::vector< uint64_t > &outs)
 
bool get_rings (const crypto::hash &txid, std::vector< std::pair< crypto::key_image, std::vector< uint64_t >>> &outs)
 
bool set_ring (const crypto::key_image &key_image, const std::vector< uint64_t > &outs, bool relative)
 
bool unset_ring (const std::vector< crypto::key_image > &key_images)
 
bool unset_ring (const crypto::hash &txid)
 
bool find_and_save_rings (bool force=true)
 
bool blackball_output (const std::pair< uint64_t, uint64_t > &output)
 
bool set_blackballed_outputs (const std::vector< std::pair< uint64_t, uint64_t >> &outputs, bool add=false)
 
bool unblackball_output (const std::pair< uint64_t, uint64_t > &output)
 
bool is_output_blackballed (const std::pair< uint64_t, uint64_t > &output) const
 
void freeze (size_t idx)
 
void thaw (size_t idx)
 
bool frozen (size_t idx) const
 
void freeze (const crypto::key_image &ki)
 
void thaw (const crypto::key_image &ki)
 
bool frozen (const crypto::key_image &ki) const
 
bool frozen (const transfer_details &td) const
 
uint64_t get_bytes_sent () const
 
uint64_t get_bytes_received () const
 
void add_checkpoint (uint64_t height, std::string hash)
 
mms::message_storeget_message_store ()
 
const mms::message_storeget_message_store () const
 
mms::multisig_wallet_state get_multisig_wallet_state () const
 
bool lock_keys_file ()
 
bool unlock_keys_file ()
 
bool is_keys_file_locked () const
 
void change_password (const std::string &filename, const epee::wipeable_string &original_password, const epee::wipeable_string &new_password)
 
void set_tx_notify (const std::shared_ptr< tools::Notify > &notify)
 
bool is_tx_spendtime_unlocked (uint64_t unlock_time, uint64_t block_height) const
 
void hash_m_transfer (const transfer_details &transfer, crypto::hash &hash) const
 
uint64_t hash_m_transfers (int64_t transfer_height, crypto::hash &hash) const
 
void finish_rescan_bc_keep_key_images (uint64_t transfer_height, const crypto::hash &hash)
 
void enable_dns (bool enable)
 
void set_offline (bool offline=true)
 
template<typename T >
void transfer_selected (const std::vector< cryptonote::tx_destination_entry > &dsts, const std::vector< size_t > &selected_transfers, size_t fake_outputs_count, std::vector< std::vector< tools::wallet2::get_outs_entry >> &outs, uint64_t unlock_time, uint64_t fee, const std::vector< uint8_t > &extra, T destination_split_strategy, const tx_dust_policy &dust_policy, cryptonote::transaction &tx, pending_tx &ptx)
 

Static Public Member Functions

static const char * tr (const char *str)
 
static bool has_testnet_option (const boost::program_options::variables_map &vm)
 
static bool has_stagenet_option (const boost::program_options::variables_map &vm)
 
static std::string device_name_option (const boost::program_options::variables_map &vm)
 
static std::string device_derivation_path_option (const boost::program_options::variables_map &vm)
 
static void init_options (boost::program_options::options_description &desc_params)
 
static std::pair< std::unique_ptr< wallet2 >, password_containermake_from_json (const boost::program_options::variables_map &vm, bool unattended, const std::string &json_file, const std::function< boost::optional< password_container >(const char *, bool)> &password_prompter)
 Uses stdin and stdout. Returns a wallet2 if no errors. More...
 
static std::pair< std::unique_ptr< wallet2 >, password_containermake_from_file (const boost::program_options::variables_map &vm, bool unattended, const std::string &wallet_file, const std::function< boost::optional< password_container >(const char *, bool)> &password_prompter)
 Uses stdin and stdout. Returns a wallet2 and password for wallet_file if no errors. More...
 
static std::pair< std::unique_ptr< wallet2 >, password_containermake_new (const boost::program_options::variables_map &vm, bool unattended, const std::function< boost::optional< password_container >(const char *, bool)> &password_prompter)
 Uses stdin and stdout. Returns a wallet2 and password for wallet with no file if no errors. More...
 
static std::unique_ptr< wallet2make_dummy (const boost::program_options::variables_map &vm, bool unattended, const std::function< boost::optional< password_container >(const char *, bool)> &password_prompter)
 Just parses variables. More...
 
static bool verify_password (const std::string &keys_file_name, const epee::wipeable_string &password, bool no_spend_key, hw::device &hwdev, uint64_t kdf_rounds)
 verify password for specified wallet keys file. More...
 
static bool query_device (hw::device::device_type &device_type, const std::string &keys_file_name, const epee::wipeable_string &password, uint64_t kdf_rounds=1)
 determine the key storage for the specified wallet file More...
 
static bool verify_multisig_info (const std::string &data, crypto::secret_key &skey, crypto::public_key &pkey)
 
static bool verify_extra_multisig_info (const std::string &data, std::unordered_set< crypto::public_key > &pkeys, crypto::public_key &signer)
 
static void wallet_exists (const std::string &file_path, bool &keys_file_exists, bool &wallet_file_exists)
 Check if wallet keys and bin files exist. More...
 
static std::string get_human_readable_timestamp (uint64_t ts)
 Check if wallet file path is valid format. More...
 
static bool wallet_valid_path_format (const std::string &file_path)
 
static bool parse_long_payment_id (const std::string &payment_id_str, crypto::hash &payment_id)
 
static bool parse_short_payment_id (const std::string &payment_id_str, crypto::hash8 &payment_id)
 
static bool parse_payment_id (const std::string &payment_id_str, crypto::hash &payment_id)
 

Public Attributes

const char *const ATTRIBUTE_DESCRIPTION = "wallet2.description"
 

Static Public Attributes

static constexpr const std::chrono::seconds rpc_timeout = std::chrono::minutes(3) + std::chrono::seconds(30)
 

Private Member Functions

bool store_keys (const std::string &keys_file_name, const epee::wipeable_string &password, bool watch_only=false)
 Stores wallet information to wallet file. More...
 
bool load_keys (const std::string &keys_file_name, const epee::wipeable_string &password)
 Load wallet information from wallet file. More...
 
void process_new_transaction (const crypto::hash &txid, const cryptonote::transaction &tx, const std::vector< uint64_t > &o_indices, uint64_t height, uint64_t ts, bool miner_tx, bool pool, bool double_spend_seen, const tx_cache_data &tx_cache_data, std::map< std::pair< uint64_t, uint64_t >, size_t > *output_tracker_cache=NULL)
 
bool should_skip_block (const cryptonote::block &b, uint64_t height) const
 
void process_new_blockchain_entry (const cryptonote::block &b, const cryptonote::block_complete_entry &bche, const parsed_block &parsed_block, const crypto::hash &bl_id, uint64_t height, const std::vector< tx_cache_data > &tx_cache_data, size_t tx_cache_data_offset, std::map< std::pair< uint64_t, uint64_t >, size_t > *output_tracker_cache=NULL)
 
void detach_blockchain (uint64_t height, std::map< std::pair< uint64_t, uint64_t >, size_t > *output_tracker_cache=NULL)
 
void get_short_chain_history (std::list< crypto::hash > &ids, uint64_t granularity=1) const
 
bool clear ()
 
void clear_soft (bool keep_key_images=false)
 
void pull_blocks (uint64_t start_height, uint64_t &blocks_start_height, const std::list< crypto::hash > &short_chain_history, std::vector< cryptonote::block_complete_entry > &blocks, std::vector< cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices > &o_indices)
 
void pull_hashes (uint64_t start_height, uint64_t &blocks_start_height, const std::list< crypto::hash > &short_chain_history, std::vector< crypto::hash > &hashes)
 
void fast_refresh (uint64_t stop_height, uint64_t &blocks_start_height, std::list< crypto::hash > &short_chain_history, bool force=false)
 
void pull_and_parse_next_blocks (uint64_t start_height, uint64_t &blocks_start_height, std::list< crypto::hash > &short_chain_history, const std::vector< cryptonote::block_complete_entry > &prev_blocks, const std::vector< parsed_block > &prev_parsed_blocks, std::vector< cryptonote::block_complete_entry > &blocks, std::vector< parsed_block > &parsed_blocks, bool &error)
 
void process_parsed_blocks (uint64_t start_height, const std::vector< cryptonote::block_complete_entry > &blocks, const std::vector< parsed_block > &parsed_blocks, uint64_t &blocks_added, std::map< std::pair< uint64_t, uint64_t >, size_t > *output_tracker_cache=NULL)
 
uint64_t select_transfers (uint64_t needed_money, std::vector< size_t > unused_transfers_indices, std::vector< size_t > &selected_transfers) const
 
bool prepare_file_names (const std::string &file_path)
 
void process_unconfirmed (const crypto::hash &txid, const cryptonote::transaction &tx, uint64_t height)
 
void process_outgoing (const crypto::hash &txid, const cryptonote::transaction &tx, uint64_t height, uint64_t ts, uint64_t spent, uint64_t received, uint32_t subaddr_account, const std::set< uint32_t > &subaddr_indices)
 
void add_unconfirmed_tx (const cryptonote::transaction &tx, uint64_t amount_in, const std::vector< cryptonote::tx_destination_entry > &dests, const crypto::hash &payment_id, uint64_t change_amount, uint32_t subaddr_account, const std::set< uint32_t > &subaddr_indices)
 
void generate_genesis (cryptonote::block &b) const
 
void check_genesis (const crypto::hash &genesis_hash) const
 
bool generate_chacha_key_from_secret_keys (crypto::chacha_key &key) const
 
void generate_chacha_key_from_password (const epee::wipeable_string &pass, crypto::chacha_key &key) const
 
crypto::hash get_payment_id (const pending_tx &ptx) const
 
void check_acc_out_precomp (const cryptonote::tx_out &o, const crypto::key_derivation &derivation, const std::vector< crypto::key_derivation > &additional_derivations, size_t i, tx_scan_info_t &tx_scan_info) const
 
void check_acc_out_precomp (const cryptonote::tx_out &o, const crypto::key_derivation &derivation, const std::vector< crypto::key_derivation > &additional_derivations, size_t i, const is_out_data *is_out_data, tx_scan_info_t &tx_scan_info) const
 
void check_acc_out_precomp_once (const cryptonote::tx_out &o, const crypto::key_derivation &derivation, const std::vector< crypto::key_derivation > &additional_derivations, size_t i, const is_out_data *is_out_data, tx_scan_info_t &tx_scan_info, bool &already_seen) const
 
void parse_block_round (const cryptonote::blobdata &blob, cryptonote::block &bl, crypto::hash &bl_id, bool &error) const
 
uint64_t get_upper_transaction_weight_limit () const
 
std::vector< uint64_t > get_unspent_amounts_vector () const
 
uint64_t get_dynamic_base_fee_estimate () const
 
float get_output_relatedness (const transfer_details &td0, const transfer_details &td1) const
 
std::vector< size_t > pick_preferred_rct_inputs (uint64_t needed_money, uint32_t subaddr_account, const std::set< uint32_t > &subaddr_indices) const
 
void set_spent (size_t idx, uint64_t height)
 
void set_unspent (size_t idx)
 
void get_outs (std::vector< std::vector< get_outs_entry >> &outs, const std::vector< size_t > &selected_transfers, size_t fake_outputs_count)
 
bool tx_add_fake_output (std::vector< std::vector< tools::wallet2::get_outs_entry >> &outs, uint64_t global_index, const crypto::public_key &tx_public_key, const rct::key &mask, uint64_t real_index, bool unlocked) const
 
bool should_pick_a_second_output (bool use_rct, size_t n_transfers, const std::vector< size_t > &unused_transfers_indices, const std::vector< size_t > &unused_dust_indices) const
 
std::vector< size_t > get_only_rct (const std::vector< size_t > &unused_dust_indices, const std::vector< size_t > &unused_transfers_indices) const
 
void scan_output (const cryptonote::transaction &tx, bool miner_tx, const crypto::public_key &tx_pub_key, size_t i, tx_scan_info_t &tx_scan_info, int &num_vouts_received, std::unordered_map< cryptonote::subaddress_index, uint64_t > &tx_money_got_in_outs, std::vector< size_t > &outs, bool pool)
 
void trim_hashchain ()
 
crypto::key_image get_multisig_composite_key_image (size_t n) const
 
rct::multisig_kLRki get_multisig_composite_kLRki (size_t n, const std::unordered_set< crypto::public_key > &ignore_set, std::unordered_set< rct::key > &used_L, std::unordered_set< rct::key > &new_used_L) const
 
rct::multisig_kLRki get_multisig_kLRki (size_t n, const rct::key &k) const
 
rct::key get_multisig_k (size_t idx, const std::unordered_set< rct::key > &used_L) const
 
void update_multisig_rescan_info (const std::vector< std::vector< rct::key >> &multisig_k, const std::vector< std::vector< tools::wallet2::multisig_info >> &info, size_t n)
 
bool add_rings (const crypto::chacha_key &key, const cryptonote::transaction_prefix &tx)
 
bool add_rings (const cryptonote::transaction_prefix &tx)
 
bool remove_rings (const cryptonote::transaction_prefix &tx)
 
bool get_ring (const crypto::chacha_key &key, const crypto::key_image &key_image, std::vector< uint64_t > &outs)
 
crypto::chacha_key get_ringdb_key ()
 
void setup_keys (const epee::wipeable_string &password)
 
size_t get_transfer_details (const crypto::key_image &ki) const
 
void register_devices ()
 
hw::devicelookup_device (const std::string &device_descriptor)
 
bool get_rct_distribution (uint64_t &start_height, std::vector< uint64_t > &distribution)
 
uint64_t get_segregation_fork_height () const
 
void unpack_multisig_info (const std::vector< std::string > &info, std::vector< crypto::public_key > &public_keys, std::vector< crypto::secret_key > &secret_keys) const
 
bool unpack_extra_multisig_info (const std::vector< std::string > &info, std::vector< crypto::public_key > &signers, std::unordered_set< crypto::public_key > &pkeys) const
 
void cache_tx_data (const cryptonote::transaction &tx, const crypto::hash &txid, tx_cache_data &tx_cache_data) const
 
std::shared_ptr< std::map< std::pair< uint64_t, uint64_t >, size_t > > create_output_tracker_cache () const
 
void init_type (hw::device::device_type device_type)
 
void setup_new_blockchain ()
 
void create_keys_file (const std::string &wallet_, bool watch_only, const epee::wipeable_string &password, bool create_address_file)
 
wallet_device_callbackget_device_callback ()
 
void on_device_button_request (uint64_t code)
 
void on_device_button_pressed ()
 
boost::optional< epee::wipeable_string > on_device_pin_request ()
 
boost::optional< epee::wipeable_string > on_device_passphrase_request (bool on_device)
 
void on_device_progress (const hw::device_progress &event)
 
std::string get_rpc_status (const std::string &s) const
 
void throw_on_rpc_response_error (const boost::optional< std::string > &status, const char *method) const
 
cryptonote::blobdata get_pruned_tx_blob (const cryptonote::blobdata &blobdata)
 

Private Attributes

cryptonote::account_base m_account
 
boost::optional< epee::net_utils::http::login > m_daemon_login
 
std::string m_daemon_address
 
std::string m_wallet_file
 
std::string m_keys_file
 
std::string m_mms_file
 
epee::net_utils::http::http_simple_client m_http_client
 
hashchain m_blockchain
 
std::unordered_map< crypto::hash, unconfirmed_transfer_detailsm_unconfirmed_txs
 
std::unordered_map< crypto::hash, confirmed_transfer_detailsm_confirmed_txs
 
std::unordered_multimap< crypto::hash, pool_payment_detailsm_unconfirmed_payments
 
std::unordered_map< crypto::hash, crypto::secret_keym_tx_keys
 
cryptonote::checkpoints m_checkpoints
 
uint64_t fallback_to_pow_checkpoint_height
 
std::string fallback_to_pow_checkpoint_hash
 
std::unordered_map< crypto::hash, std::vector< crypto::secret_key > > m_additional_tx_keys
 
transfer_container m_transfers
 
payment_container m_payments
 
std::unordered_map< crypto::key_image, size_t > m_key_images
 
std::unordered_map< crypto::public_key, size_t > m_pub_keys
 
cryptonote::account_public_address m_account_public_address
 
std::unordered_map< crypto::public_key, cryptonote::subaddress_indexm_subaddresses
 
std::vector< std::vector< std::string > > m_subaddress_labels
 
std::unordered_map< crypto::hash, std::string > m_tx_notes
 
std::unordered_map< std::string, std::string > m_attributes
 
std::vector< tools::wallet2::address_book_rowm_address_book
 
std::pair< std::map< std::string, std::string >, std::vector< std::string > > m_account_tags
 
uint64_t m_upper_transaction_weight_limit
 
const std::vector< std::vector< tools::wallet2::multisig_info > > * m_multisig_rescan_info
 
const std::vector< std::vector< rct::key > > * m_multisig_rescan_k
 
std::unordered_map< crypto::public_key, crypto::key_imagem_cold_key_images
 
std::atomic< boolm_run
 
boost::recursive_mutex m_daemon_rpc_mutex
 
bool m_trusted_daemon
 
i_wallet2_callbackm_callback
 
hw::device::device_type m_key_device_type
 
cryptonote::network_type m_nettype
 
uint64_t m_kdf_rounds
 
std::string seed_language
 
bool is_old_file_format
 
bool m_watch_only
 
bool m_multisig
 
uint32_t m_multisig_threshold
 
std::vector< crypto::public_keym_multisig_signers
 
uint32_t m_multisig_rounds_passed
 
std::vector< crypto::public_keym_multisig_derivations
 
bool m_always_confirm_transfers
 
bool m_print_ring_members
 
bool m_store_tx_info
 
uint32_t m_default_mixin
 
uint32_t m_default_priority
 
RefreshType m_refresh_type
 
bool m_auto_refresh
 
bool m_first_refresh_done
 
uint64_t m_refresh_from_block_height
 
bool m_explicit_refresh_from_block_height
 
bool m_confirm_missing_payment_id
 
bool m_confirm_non_default_ring_size
 
AskPasswordType m_ask_password
 
uint32_t m_min_output_count
 
uint64_t m_min_output_value
 
bool m_merge_destinations
 
bool m_confirm_backlog
 
uint32_t m_confirm_backlog_threshold
 
bool m_confirm_export_overwrite
 
bool m_auto_low_priority
 
bool m_segregate_pre_fork_outputs
 
bool m_key_reuse_mitigation2
 
uint64_t m_segregation_height
 
bool m_ignore_fractional_outputs
 
bool m_track_uses
 
BackgroundMiningSetupType m_setup_background_mining
 
bool m_is_initialized
 
NodeRPCProxy m_node_rpc_proxy
 
std::unordered_set< crypto::hashm_scanned_pool_txs [2]
 
size_t m_subaddress_lookahead_major
 
size_t m_subaddress_lookahead_minor
 
std::string m_device_name
 
std::string m_device_derivation_path
 
uint64_t m_device_last_key_image_sync
 
bool m_use_dns
 
bool m_offline
 
std::unordered_map< crypto::hash, std::string > m_tx_device
 
bool m_light_wallet
 
uint64_t m_light_wallet_scanned_block_height
 
uint64_t m_light_wallet_blockchain_height
 
uint64_t m_light_wallet_per_kb_fee = FEE_PER_KB
 
bool m_light_wallet_connected
 
uint64_t m_light_wallet_balance
 
uint64_t m_light_wallet_unlocked_balance
 
std::unordered_map< crypto::hash, address_txm_light_wallet_address_txs
 
std::unordered_map< crypto::public_key, std::map< uint64_t, crypto::key_image > > m_key_image_cache
 
std::string m_ring_database
 
bool m_ring_history_saved
 
std::unique_ptr< ringdbm_ringdb
 
boost::optional< crypto::chacha_key > m_ringdb_key
 
uint64_t m_last_block_reward
 
std::unique_ptr< tools::file_lockerm_keys_file_locker
 
mms::message_store m_message_store
 
bool m_original_keys_available
 
cryptonote::account_public_address m_original_address
 
crypto::secret_key m_original_view_secret_key
 
crypto::chacha_key m_cache_key
 
boost::optional< epee::wipeable_string > m_encrypt_keys_after_refresh
 
bool m_unattended
 
bool m_devices_registered
 
std::shared_ptr< tools::Notifym_tx_notify
 
std::unique_ptr< wallet_device_callbackm_device_callback
 
bool m_display_progress_indicator
 
uint32_t m_account_major_offset
 

Friends

class ::Serialization_portability_wallet_Test
 
class ::wallet_accessor_test
 
class wallet_keys_unlocker
 
class wallet_device_callback
 

Member Typedef Documentation

◆ get_outs_entry

◆ payment_container

◆ transfer_container

Member Enumeration Documentation

◆ AskPasswordType

Enumerator
AskPasswordNever 
AskPasswordOnAction 
AskPasswordToDecrypt 

◆ BackgroundMiningSetupType

Enumerator
BackgroundMiningMaybe 
BackgroundMiningYes 
BackgroundMiningNo 

◆ RefreshType

Enumerator
RefreshFull 
RefreshOptimizeCoinbase 
RefreshNoCoinbase 
RefreshDefault 

Constructor & Destructor Documentation

◆ wallet2()

tools::wallet2::wallet2 ( cryptonote::network_type  nettype = cryptonote::MAINNET,
uint64_t  kdf_rounds = 1,
bool  unattended = false 
)

◆ ~wallet2()

tools::wallet2::~wallet2 ( )

Member Function Documentation

◆ account_major_offset() [1/2]

uint32_t tools::wallet2::account_major_offset ( ) const
inline

◆ account_major_offset() [2/2]

void tools::wallet2::account_major_offset ( uint32_t  offset)
inline

◆ add_address_book_row()

bool tools::wallet2::add_address_book_row ( const cryptonote::account_public_address address,
const crypto::hash payment_id,
const std::string &  description,
bool  is_subaddress 
)

◆ add_checkpoint()

void tools::wallet2::add_checkpoint ( uint64_t  height,
std::string  hash 
)

◆ add_rings() [1/2]

bool tools::wallet2::add_rings ( const crypto::chacha_key &  key,
const cryptonote::transaction_prefix tx 
)
private

◆ add_rings() [2/2]

bool tools::wallet2::add_rings ( const cryptonote::transaction_prefix tx)
private

◆ add_subaddress()

void tools::wallet2::add_subaddress ( uint32_t  index_major,
const std::string &  label 
)

◆ add_subaddress_account()

void tools::wallet2::add_subaddress_account ( const std::string &  label,
const bool  update_account_tags = true 
)

◆ add_unconfirmed_tx()

void tools::wallet2::add_unconfirmed_tx ( const cryptonote::transaction tx,
uint64_t  amount_in,
const std::vector< cryptonote::tx_destination_entry > &  dests,
const crypto::hash payment_id,
uint64_t  change_amount,
uint32_t  subaddr_account,
const std::set< uint32_t > &  subaddr_indices 
)
private

◆ adjust_mixin()

uint64_t tools::wallet2::adjust_mixin ( uint64_t  mixin) const

◆ adjust_priority()

uint32_t tools::wallet2::adjust_priority ( uint32_t  priority)

◆ always_confirm_transfers() [1/2]

bool tools::wallet2::always_confirm_transfers ( ) const
inline

◆ always_confirm_transfers() [2/2]

void tools::wallet2::always_confirm_transfers ( bool  always)
inline

◆ ask_password() [1/2]

AskPasswordType tools::wallet2::ask_password ( ) const
inline

◆ ask_password() [2/2]

void tools::wallet2::ask_password ( AskPasswordType  ask)
inline

◆ auto_low_priority() [1/2]

bool tools::wallet2::auto_low_priority ( ) const
inline

◆ auto_low_priority() [2/2]

void tools::wallet2::auto_low_priority ( bool  value)
inline

◆ auto_refresh() [1/2]

bool tools::wallet2::auto_refresh ( ) const
inline

◆ auto_refresh() [2/2]

void tools::wallet2::auto_refresh ( bool  r)
inline

◆ balance()

uint64_t tools::wallet2::balance ( uint32_t  subaddr_index_major) const

◆ balance_all()

uint64_t tools::wallet2::balance_all ( ) const

◆ balance_per_subaddress()

std::map< uint32_t, uint64_t > tools::wallet2::balance_per_subaddress ( uint32_t  subaddr_index_major) const

◆ blackball_output()

bool tools::wallet2::blackball_output ( const std::pair< uint64_t, uint64_t > &  output)

◆ cache_tx_data()

void tools::wallet2::cache_tx_data ( const cryptonote::transaction tx,
const crypto::hash txid,
tx_cache_data tx_cache_data 
) const
private

◆ callback() [1/2]

i_wallet2_callback* tools::wallet2::callback ( ) const
inline

◆ callback() [2/2]

void tools::wallet2::callback ( i_wallet2_callback callback)
inline

◆ change_password()

void tools::wallet2::change_password ( const std::string &  filename,
const epee::wipeable_string &  original_password,
const epee::wipeable_string &  new_password 
)

◆ check_acc_out_precomp() [1/2]

void tools::wallet2::check_acc_out_precomp ( const cryptonote::tx_out o,
const crypto::key_derivation derivation,
const std::vector< crypto::key_derivation > &  additional_derivations,
size_t  i,
const is_out_data is_out_data,
tx_scan_info_t tx_scan_info 
) const
private

◆ check_acc_out_precomp() [2/2]

void tools::wallet2::check_acc_out_precomp ( const cryptonote::tx_out o,
const crypto::key_derivation derivation,
const std::vector< crypto::key_derivation > &  additional_derivations,
size_t  i,
tx_scan_info_t tx_scan_info 
) const
private

◆ check_acc_out_precomp_once()

void tools::wallet2::check_acc_out_precomp_once ( const cryptonote::tx_out o,
const crypto::key_derivation derivation,
const std::vector< crypto::key_derivation > &  additional_derivations,
size_t  i,
const is_out_data is_out_data,
tx_scan_info_t tx_scan_info,
bool already_seen 
) const
private

◆ check_connection()

bool tools::wallet2::check_connection ( uint32_t *  version = NULL,
bool ssl = NULL,
uint32_t  timeout = 200000 
)

◆ check_genesis()

void tools::wallet2::check_genesis ( const crypto::hash genesis_hash) const
private

◆ check_reserve_proof()

bool tools::wallet2::check_reserve_proof ( const cryptonote::account_public_address address,
const std::string &  message,
const std::string &  sig_str,
uint64_t &  total,
uint64_t &  spent 
)

Verifies a proof of reserve.

Parameters
addressThe signer's address
messageChallenge message used for signing
sig_strSignature string
total[OUT] the sum of funds included in the signature
spent[OUT] the sum of spent funds included in the signature
Returns
true if the signature verifies correctly

◆ check_spend_proof()

bool tools::wallet2::check_spend_proof ( const crypto::hash txid,
const std::string &  message,
const std::string &  sig_str 
)

◆ check_tx_key()

void tools::wallet2::check_tx_key ( const crypto::hash txid,
const crypto::secret_key tx_key,
const std::vector< crypto::secret_key > &  additional_tx_keys,
const cryptonote::account_public_address address,
uint64_t &  received,
bool in_pool,
uint64_t &  confirmations 
)

◆ check_tx_key_helper() [1/2]

void tools::wallet2::check_tx_key_helper ( const crypto::hash txid,
const crypto::key_derivation derivation,
const std::vector< crypto::key_derivation > &  additional_derivations,
const cryptonote::account_public_address address,
uint64_t &  received,
bool in_pool,
uint64_t &  confirmations 
)

◆ check_tx_key_helper() [2/2]

void tools::wallet2::check_tx_key_helper ( const cryptonote::transaction tx,
const crypto::key_derivation derivation,
const std::vector< crypto::key_derivation > &  additional_derivations,
const cryptonote::account_public_address address,
uint64_t &  received 
) const

◆ check_tx_proof() [1/2]

bool tools::wallet2::check_tx_proof ( const crypto::hash txid,
const cryptonote::account_public_address address,
bool  is_subaddress,
const std::string &  message,
const std::string &  sig_str,
uint64_t &  received,
bool in_pool,
uint64_t &  confirmations 
)

◆ check_tx_proof() [2/2]

bool tools::wallet2::check_tx_proof ( const cryptonote::transaction tx,
const cryptonote::account_public_address address,
bool  is_subaddress,
const std::string &  message,
const std::string &  sig_str,
uint64_t &  received 
) const

◆ clear()

bool tools::wallet2::clear ( )
private

◆ clear_soft()

void tools::wallet2::clear_soft ( bool  keep_key_images = false)
private

◆ cold_key_image_sync()

uint64_t tools::wallet2::cold_key_image_sync ( uint64_t &  spent,
uint64_t &  unspent 
)

◆ cold_sign_tx()

void tools::wallet2::cold_sign_tx ( const std::vector< pending_tx > &  ptx_vector,
signed_tx_set exported_txs,
std::vector< cryptonote::address_parse_info > &  dsts_info,
std::vector< std::string > &  tx_device_aux 
)

◆ cold_tx_aux_import()

void tools::wallet2::cold_tx_aux_import ( const std::vector< pending_tx > &  ptx,
const std::vector< std::string > &  tx_device_aux 
)

◆ commit_tx() [1/2]

void tools::wallet2::commit_tx ( pending_tx ptx_vector)

◆ commit_tx() [2/2]

void tools::wallet2::commit_tx ( std::vector< pending_tx > &  ptx_vector)

◆ confirm_backlog() [1/2]

bool tools::wallet2::confirm_backlog ( ) const
inline

◆ confirm_backlog() [2/2]

void tools::wallet2::confirm_backlog ( bool  always)
inline

◆ confirm_export_overwrite() [1/2]

bool tools::wallet2::confirm_export_overwrite ( ) const
inline

◆ confirm_export_overwrite() [2/2]

void tools::wallet2::confirm_export_overwrite ( bool  always)
inline

◆ confirm_missing_payment_id() [1/2]

bool tools::wallet2::confirm_missing_payment_id ( ) const
inline

◆ confirm_missing_payment_id() [2/2]

void tools::wallet2::confirm_missing_payment_id ( bool  always)
inline

◆ confirm_non_default_ring_size() [1/2]

bool tools::wallet2::confirm_non_default_ring_size ( ) const
inline

◆ confirm_non_default_ring_size() [2/2]

void tools::wallet2::confirm_non_default_ring_size ( bool  always)
inline

◆ create_keys_file()

void tools::wallet2::create_keys_file ( const std::string &  wallet_,
bool  watch_only,
const epee::wipeable_string &  password,
bool  create_address_file 
)
private

◆ create_output_tracker_cache()

std::shared_ptr< std::map< std::pair< uint64_t, uint64_t >, size_t > > tools::wallet2::create_output_tracker_cache ( ) const
private

◆ create_transactions_2()

std::vector< wallet2::pending_tx > tools::wallet2::create_transactions_2 ( std::vector< cryptonote::tx_destination_entry dsts,
const size_t  fake_outs_count,
const uint64_t  unlock_time,
uint32_t  priority,
const std::vector< uint8_t > &  extra,
uint32_t  subaddr_account,
std::set< uint32_t >  subaddr_indices 
)

◆ create_transactions_all()

std::vector< wallet2::pending_tx > tools::wallet2::create_transactions_all ( uint64_t  below,
const cryptonote::account_public_address address,
bool  is_subaddress,
const size_t  outputs,
const size_t  fake_outs_count,
const uint64_t  unlock_time,
uint32_t  priority,
const std::vector< uint8_t > &  extra,
uint32_t  subaddr_account,
std::set< uint32_t >  subaddr_indices 
)

◆ create_transactions_from()

std::vector< wallet2::pending_tx > tools::wallet2::create_transactions_from ( const cryptonote::account_public_address address,
bool  is_subaddress,
const size_t  outputs,
std::vector< size_t >  unused_transfers_indices,
std::vector< size_t >  unused_dust_indices,
const size_t  fake_outs_count,
const uint64_t  unlock_time,
uint32_t  priority,
const std::vector< uint8_t > &  extra 
)

◆ create_transactions_single()

std::vector< wallet2::pending_tx > tools::wallet2::create_transactions_single ( const crypto::key_image ki,
const cryptonote::account_public_address address,
bool  is_subaddress,
const size_t  outputs,
const size_t  fake_outs_count,
const uint64_t  unlock_time,
uint32_t  priority,
const std::vector< uint8_t > &  extra 
)

◆ create_unmixable_sweep_transactions()

std::vector< wallet2::pending_tx > tools::wallet2::create_unmixable_sweep_transactions ( )

◆ decrypt()

template<typename T >
template epee::wipeable_string tools::wallet2::decrypt ( const std::string &  ciphertext,
const crypto::secret_key skey,
bool  authenticated = true 
) const

◆ decrypt_keys() [1/2]

void tools::wallet2::decrypt_keys ( const crypto::chacha_key &  key)

◆ decrypt_keys() [2/2]

void tools::wallet2::decrypt_keys ( const epee::wipeable_string &  password)

◆ decrypt_with_view_secret_key()

std::string tools::wallet2::decrypt_with_view_secret_key ( const std::string &  ciphertext,
bool  authenticated = true 
) const

◆ default_mixin() [1/2]

uint32_t tools::wallet2::default_mixin ( ) const
inline

◆ default_mixin() [2/2]

void tools::wallet2::default_mixin ( uint32_t  m)
inline

◆ deinit()

bool tools::wallet2::deinit ( )

◆ delete_address_book_row()

bool tools::wallet2::delete_address_book_row ( std::size_t  row_id)

◆ detach_blockchain()

void tools::wallet2::detach_blockchain ( uint64_t  height,
std::map< std::pair< uint64_t, uint64_t >, size_t > *  output_tracker_cache = NULL 
)
private

◆ device_derivation_path() [1/2]

const std::string& tools::wallet2::device_derivation_path ( ) const
inline

◆ device_derivation_path() [2/2]

void tools::wallet2::device_derivation_path ( const std::string &  device_derivation_path)
inline

◆ device_derivation_path_option()

std::string tools::wallet2::device_derivation_path_option ( const boost::program_options::variables_map &  vm)
static

◆ device_name() [1/2]

const std::string& tools::wallet2::device_name ( ) const
inline

◆ device_name() [2/2]

void tools::wallet2::device_name ( const std::string &  device_name)
inline

◆ device_name_option()

std::string tools::wallet2::device_name_option ( const boost::program_options::variables_map &  vm)
static

◆ discard_unmixable_outputs()

void tools::wallet2::discard_unmixable_outputs ( )

◆ dump_tx_to_str()

std::string tools::wallet2::dump_tx_to_str ( const std::vector< pending_tx > &  ptx_vector) const

◆ enable_dns()

void tools::wallet2::enable_dns ( bool  enable)
inline

◆ encrypt() [1/4]

std::string tools::wallet2::encrypt ( const char *  plaintext,
size_t  len,
const crypto::secret_key skey,
bool  authenticated = true 
) const

◆ encrypt() [2/4]

std::string tools::wallet2::encrypt ( const epee::span< char > &  span,
const crypto::secret_key skey,
bool  authenticated = true 
) const

◆ encrypt() [3/4]

std::string tools::wallet2::encrypt ( const epee::wipeable_string &  plaintext,
const crypto::secret_key skey,
bool  authenticated = true 
) const

◆ encrypt() [4/4]

std::string tools::wallet2::encrypt ( const std::string &  plaintext,
const crypto::secret_key skey,
bool  authenticated = true 
) const

◆ encrypt_keys() [1/2]

void tools::wallet2::encrypt_keys ( const crypto::chacha_key &  key)

◆ encrypt_keys() [2/2]

void tools::wallet2::encrypt_keys ( const epee::wipeable_string &  password)

◆ encrypt_with_view_secret_key()

std::string tools::wallet2::encrypt_with_view_secret_key ( const std::string &  plaintext,
bool  authenticated = true 
) const

◆ estimate_backlog() [1/2]

std::vector< std::pair< uint64_t, uint64_t > > tools::wallet2::estimate_backlog ( const std::vector< std::pair< double, double >> &  fee_levels)

◆ estimate_backlog() [2/2]

std::vector< std::pair< uint64_t, uint64_t > > tools::wallet2::estimate_backlog ( uint64_t  min_tx_weight,
uint64_t  max_tx_weight,
const std::vector< uint64_t > &  fees 
)

◆ estimate_blockchain_height()

uint64_t tools::wallet2::estimate_blockchain_height ( )

◆ exchange_multisig_keys() [1/2]

std::string tools::wallet2::exchange_multisig_keys ( const epee::wipeable_string &  password,
const std::vector< std::string > &  info 
)

◆ exchange_multisig_keys() [2/2]

std::string tools::wallet2::exchange_multisig_keys ( const epee::wipeable_string &  password,
std::unordered_set< crypto::public_key pkeys,
std::vector< crypto::public_key signers 
)

Any but first round of keys exchange.

◆ expand_subaddresses()

void tools::wallet2::expand_subaddresses ( const cryptonote::subaddress_index index,
const bool  udpate_account_tags = true 
)

◆ explicit_refresh_from_block_height() [1/2]

bool tools::wallet2::explicit_refresh_from_block_height ( ) const
inline

◆ explicit_refresh_from_block_height() [2/2]

void tools::wallet2::explicit_refresh_from_block_height ( bool  expl)
inline

◆ export_blockchain()

std::tuple< size_t, crypto::hash, std::vector< crypto::hash > > tools::wallet2::export_blockchain ( ) const

◆ export_key_images() [1/2]

std::pair< size_t, std::vector< std::pair< crypto::key_image, crypto::signature > > > tools::wallet2::export_key_images ( bool  all = false) const

◆ export_key_images() [2/2]

bool tools::wallet2::export_key_images ( const std::string &  filename) const

◆ export_multisig()

cryptonote::blobdata tools::wallet2::export_multisig ( )

Export multisig info This will generate and remember new k values

◆ export_outputs()

std::pair< size_t, std::vector< tools::wallet2::transfer_details > > tools::wallet2::export_outputs ( bool  all = false) const

◆ export_outputs_to_str()

std::string tools::wallet2::export_outputs_to_str ( bool  all = false) const

◆ export_payments()

wallet2::payment_container tools::wallet2::export_payments ( ) const

◆ fast_refresh()

void tools::wallet2::fast_refresh ( uint64_t  stop_height,
uint64_t &  blocks_start_height,
std::list< crypto::hash > &  short_chain_history,
bool  force = false 
)
private

◆ finalize_multisig() [1/2]

bool tools::wallet2::finalize_multisig ( const epee::wipeable_string &  password,
const std::unordered_set< crypto::public_key > &  pkeys,
std::vector< crypto::public_key signers 
)

Finalizes creation of a multisig wallet.

◆ finalize_multisig() [2/2]

bool tools::wallet2::finalize_multisig ( const epee::wipeable_string &  password,
const std::vector< std::string > &  info 
)

Finalizes creation of a multisig wallet.

◆ find_and_save_rings()

bool tools::wallet2::find_and_save_rings ( bool  force = true)

◆ finish_rescan_bc_keep_key_images()

void tools::wallet2::finish_rescan_bc_keep_key_images ( uint64_t  transfer_height,
const crypto::hash hash 
)

◆ freeze() [1/2]

void tools::wallet2::freeze ( const crypto::key_image ki)

◆ freeze() [2/2]

void tools::wallet2::freeze ( size_t  idx)

◆ frozen() [1/3]

bool tools::wallet2::frozen ( const crypto::key_image ki) const

◆ frozen() [2/3]

bool tools::wallet2::frozen ( const transfer_details td) const

◆ frozen() [3/3]

bool tools::wallet2::frozen ( size_t  idx) const

◆ generate() [1/4]

crypto::secret_key tools::wallet2::generate ( const std::string &  wallet_,
const epee::wipeable_string &  password,
const crypto::secret_key recovery_param = crypto::secret_key(),
bool  recover = false,
bool  two_random = false,
bool  create_address_file = false 
)

Generates a wallet or restores one.

Parameters
wallet_Name of wallet file
passwordPassword of wallet file
recovery_paramIf it is a restore, the recovery key
recoverWhether it is a restore
two_randomWhether it is a non-deterministic wallet
create_address_fileWhether to create an address file
Returns
The secret key of the generated wallet

◆ generate() [2/4]

void tools::wallet2::generate ( const std::string &  wallet_,
const epee::wipeable_string &  password,
const cryptonote::account_public_address account_public_address,
const crypto::secret_key spendkey,
const crypto::secret_key viewkey,
bool  create_address_file = false 
)

Creates a wallet from a public address and a spend/view secret key pair.

Parameters
wallet_Name of wallet file
passwordPassword of wallet file
account_public_addressThe account's public address
spendkeyspend secret key
viewkeyview secret key
create_address_fileWhether to create an address file

◆ generate() [3/4]

void tools::wallet2::generate ( const std::string &  wallet_,
const epee::wipeable_string &  password,
const cryptonote::account_public_address account_public_address,
const crypto::secret_key viewkey = crypto::secret_key(),
bool  create_address_file = false 
)

Creates a watch only wallet from a public address and a view secret key.

Parameters
wallet_Name of wallet file
passwordPassword of wallet file
account_public_addressThe account's public address
viewkeyview secret key
create_address_fileWhether to create an address file

◆ generate() [4/4]

void tools::wallet2::generate ( const std::string &  wallet_,
const epee::wipeable_string &  password,
const epee::wipeable_string &  multisig_data,
bool  create_address_file = false 
)

Generates a wallet or restores one.

Parameters
wallet_Name of wallet file
passwordPassword of wallet file
multisig_dataThe multisig restore info and keys
create_address_fileWhether to create an address file

◆ generate_chacha_key_from_password()

void tools::wallet2::generate_chacha_key_from_password ( const epee::wipeable_string &  pass,
crypto::chacha_key &  key 
) const
private

◆ generate_chacha_key_from_secret_keys()

bool tools::wallet2::generate_chacha_key_from_secret_keys ( crypto::chacha_key &  key) const
private

◆ generate_genesis()

void tools::wallet2::generate_genesis ( cryptonote::block b) const
private

◆ get_account() [1/2]

cryptonote::account_base& tools::wallet2::get_account ( )
inline

◆ get_account() [2/2]

const cryptonote::account_base& tools::wallet2::get_account ( ) const
inline

◆ get_account_tags()

const std::pair< std::map< std::string, std::string >, std::vector< std::string > > & tools::wallet2::get_account_tags ( )

Get the list of registered account tags.

Returns
first.Key=(tag's name), first.Value=(tag's label), second[i]=(i-th account's tag)

◆ get_address()

cryptonote::account_public_address tools::wallet2::get_address ( ) const
inline

◆ get_address_as_str()

std::string tools::wallet2::get_address_as_str ( ) const
inline

◆ get_address_book()

std::vector<address_book_row> tools::wallet2::get_address_book ( ) const
inline

GUI Address book get/store.

◆ get_approximate_blockchain_height()

uint64_t tools::wallet2::get_approximate_blockchain_height ( ) const

Calculates the approximate blockchain height from current date/time.

◆ get_attribute()

std::string tools::wallet2::get_attribute ( const std::string &  key) const

◆ get_base_fee()

uint64_t tools::wallet2::get_base_fee ( ) const

◆ get_blockchain_current_height()

uint64_t tools::wallet2::get_blockchain_current_height ( ) const
inline

◆ get_blockchain_height_by_date()

uint64_t tools::wallet2::get_blockchain_height_by_date ( uint16_t  year,
uint8_t  month,
uint8_t  day 
)

◆ get_bytes_received()

uint64_t tools::wallet2::get_bytes_received ( ) const

◆ get_bytes_sent()

uint64_t tools::wallet2::get_bytes_sent ( ) const

◆ get_confirm_backlog_threshold()

uint32_t tools::wallet2::get_confirm_backlog_threshold ( ) const
inline

◆ get_daemon_address()

std::string tools::wallet2::get_daemon_address ( ) const

◆ get_daemon_blockchain_height()

uint64_t tools::wallet2::get_daemon_blockchain_height ( std::string &  err) const

◆ get_daemon_blockchain_target_height()

uint64_t tools::wallet2::get_daemon_blockchain_target_height ( std::string &  err)

◆ get_daemon_login()

const boost::optional<epee::net_utils::http::login>& tools::wallet2::get_daemon_login ( ) const
inline

◆ get_default_priority()

uint32_t tools::wallet2::get_default_priority ( ) const
inline

◆ get_description()

std::string tools::wallet2::get_description ( ) const

◆ get_device_callback()

wallet_device_callback * tools::wallet2::get_device_callback ( )
private

◆ get_device_last_key_image_sync()

uint64_t tools::wallet2::get_device_last_key_image_sync ( ) const
inline

◆ get_device_type()

hw::device::device_type tools::wallet2::get_device_type ( ) const
inline

◆ get_dynamic_base_fee_estimate()

uint64_t tools::wallet2::get_dynamic_base_fee_estimate ( ) const
private

◆ get_fee_algorithm()

int tools::wallet2::get_fee_algorithm ( ) const

◆ get_fee_multiplier()

uint64_t tools::wallet2::get_fee_multiplier ( uint32_t  priority,
int  fee_algorithm = -1 
) const

◆ get_fee_quantization_mask()

uint64_t tools::wallet2::get_fee_quantization_mask ( ) const

◆ get_hard_fork_info()

void tools::wallet2::get_hard_fork_info ( uint8_t  version,
uint64_t &  earliest_height 
) const

◆ get_human_readable_timestamp()

static std::string tools::wallet2::get_human_readable_timestamp ( uint64_t  ts)
inlinestatic

Check if wallet file path is valid format.

Parameters
file_pathWallet file path
Returns
Whether path is valid format

◆ get_integrated_address_as_str()

std::string tools::wallet2::get_integrated_address_as_str ( const crypto::hash8 payment_id) const

◆ get_keys_file()

std::string tools::wallet2::get_keys_file ( ) const

◆ get_last_block_reward()

uint64_t tools::wallet2::get_last_block_reward ( ) const
inline

◆ get_light_wallet_blockchain_height()

uint64_t tools::wallet2::get_light_wallet_blockchain_height ( ) const
inline

◆ get_light_wallet_scanned_block_height()

uint64_t tools::wallet2::get_light_wallet_scanned_block_height ( ) const
inline

◆ get_max_ring_size()

uint64_t tools::wallet2::get_max_ring_size ( ) const

◆ get_message_store() [1/2]

mms::message_store& tools::wallet2::get_message_store ( )
inline

◆ get_message_store() [2/2]

const mms::message_store& tools::wallet2::get_message_store ( ) const
inline

◆ get_min_output_count()

uint32_t tools::wallet2::get_min_output_count ( ) const
inline

◆ get_min_output_value()

uint64_t tools::wallet2::get_min_output_value ( ) const
inline

◆ get_min_ring_size()

uint64_t tools::wallet2::get_min_ring_size ( ) const

◆ get_multisig_composite_key_image()

crypto::key_image tools::wallet2::get_multisig_composite_key_image ( size_t  n) const
private

◆ get_multisig_composite_kLRki()

rct::multisig_kLRki tools::wallet2::get_multisig_composite_kLRki ( size_t  n,
const std::unordered_set< crypto::public_key > &  ignore_set,
std::unordered_set< rct::key > &  used_L,
std::unordered_set< rct::key > &  new_used_L 
) const
private

◆ get_multisig_info()

std::string tools::wallet2::get_multisig_info ( ) const

Get a packaged multisig information string

◆ get_multisig_k()

rct::key tools::wallet2::get_multisig_k ( size_t  idx,
const std::unordered_set< rct::key > &  used_L 
) const
private

◆ get_multisig_kLRki()

rct::multisig_kLRki tools::wallet2::get_multisig_kLRki ( size_t  n,
const rct::key k 
) const
private

◆ get_multisig_seed()

bool tools::wallet2::get_multisig_seed ( epee::wipeable_string &  seed,
const epee::wipeable_string &  passphrase = std::string(),
bool  raw = true 
) const

◆ get_multisig_signer_public_key() [1/2]

crypto::public_key tools::wallet2::get_multisig_signer_public_key ( ) const

◆ get_multisig_signer_public_key() [2/2]

crypto::public_key tools::wallet2::get_multisig_signer_public_key ( const crypto::secret_key spend_skey) const

◆ get_multisig_signing_public_key() [1/2]

crypto::public_key tools::wallet2::get_multisig_signing_public_key ( const crypto::secret_key skey) const

◆ get_multisig_signing_public_key() [2/2]

crypto::public_key tools::wallet2::get_multisig_signing_public_key ( size_t  idx) const

◆ get_multisig_wallet_state()

mms::multisig_wallet_state tools::wallet2::get_multisig_wallet_state ( ) const

◆ get_num_rct_outputs()

uint64_t tools::wallet2::get_num_rct_outputs ( )

◆ get_num_subaddress_accounts()

size_t tools::wallet2::get_num_subaddress_accounts ( ) const
inline

◆ get_num_subaddresses()

size_t tools::wallet2::get_num_subaddresses ( uint32_t  index_major) const
inline

◆ get_num_transfer_details()

size_t tools::wallet2::get_num_transfer_details ( ) const
inline

◆ get_only_rct()

std::vector< size_t > tools::wallet2::get_only_rct ( const std::vector< size_t > &  unused_dust_indices,
const std::vector< size_t > &  unused_transfers_indices 
) const
private

◆ get_output_relatedness()

float tools::wallet2::get_output_relatedness ( const transfer_details td0,
const transfer_details td1 
) const
private

◆ get_outs()

void tools::wallet2::get_outs ( std::vector< std::vector< get_outs_entry >> &  outs,
const std::vector< size_t > &  selected_transfers,
size_t  fake_outputs_count 
)
private

◆ get_payment_id()

crypto::hash tools::wallet2::get_payment_id ( const pending_tx ptx) const
private

◆ get_payments() [1/2]

void tools::wallet2::get_payments ( const crypto::hash payment_id,
std::list< wallet2::payment_details > &  payments,
uint64_t  min_height = 0,
const boost::optional< uint32_t > &  subaddr_account = boost::none,
const std::set< uint32_t > &  subaddr_indices = {} 
) const

◆ get_payments() [2/2]

void tools::wallet2::get_payments ( std::list< std::pair< crypto::hash, wallet2::payment_details >> &  payments,
uint64_t  min_height,
uint64_t  max_height = (uint64_t)-1,
const boost::optional< uint32_t > &  subaddr_account = boost::none,
const std::set< uint32_t > &  subaddr_indices = {} 
) const

◆ get_payments_out()

void tools::wallet2::get_payments_out ( std::list< std::pair< crypto::hash, wallet2::confirmed_transfer_details >> &  confirmed_payments,
uint64_t  min_height,
uint64_t  max_height = (uint64_t)-1,
const boost::optional< uint32_t > &  subaddr_account = boost::none,
const std::set< uint32_t > &  subaddr_indices = {} 
) const

◆ get_pruned_tx_blob()

cryptonote::blobdata tools::wallet2::get_pruned_tx_blob ( const cryptonote::blobdata blobdata)
private

◆ get_rct_distribution()

bool tools::wallet2::get_rct_distribution ( uint64_t &  start_height,
std::vector< uint64_t > &  distribution 
)
private

◆ get_refresh_from_block_height()

uint64_t tools::wallet2::get_refresh_from_block_height ( ) const
inline

◆ get_refresh_type()

RefreshType tools::wallet2::get_refresh_type ( ) const
inline

◆ get_reserve_proof()

std::string tools::wallet2::get_reserve_proof ( const boost::optional< std::pair< uint32_t, uint64_t >> &  account_minreserve,
const std::string &  message 
)

Generates a proof that proves the reserve of unspent funds.

Parameters
account_minreserveWhen specified, collect outputs only belonging to the given account and prove the smallest reserve above the given amount When unspecified, proves for all unspent outputs across all accounts
messageArbitrary challenge message to be signed together
Returns
Signature string

◆ get_ring() [1/2]

bool tools::wallet2::get_ring ( const crypto::chacha_key &  key,
const crypto::key_image key_image,
std::vector< uint64_t > &  outs 
)
private

◆ get_ring() [2/2]

bool tools::wallet2::get_ring ( const crypto::key_image key_image,
std::vector< uint64_t > &  outs 
)

◆ get_ring_database()

const std::string tools::wallet2::get_ring_database ( ) const
inline

◆ get_ringdb_key()

crypto::chacha_key tools::wallet2::get_ringdb_key ( )
private

◆ get_rings()

bool tools::wallet2::get_rings ( const crypto::hash txid,
std::vector< std::pair< crypto::key_image, std::vector< uint64_t >>> &  outs 
)

◆ get_rpc_status()

std::string tools::wallet2::get_rpc_status ( const std::string &  s) const
private

◆ get_seed()

bool tools::wallet2::get_seed ( epee::wipeable_string &  electrum_words,
const epee::wipeable_string &  passphrase = epee::wipeable_string() 
) const

◆ get_seed_language()

const std::string & tools::wallet2::get_seed_language ( ) const

Gets the seed language.

◆ get_segregation_fork_height()

uint64_t tools::wallet2::get_segregation_fork_height ( ) const
private

◆ get_short_chain_history()

void tools::wallet2::get_short_chain_history ( std::list< crypto::hash > &  ids,
uint64_t  granularity = 1 
) const
private

◆ get_spend_proof()

std::string tools::wallet2::get_spend_proof ( const crypto::hash txid,
const std::string &  message 
)

◆ get_subaddress()

cryptonote::account_public_address tools::wallet2::get_subaddress ( const cryptonote::subaddress_index index) const

◆ get_subaddress_as_str()

std::string tools::wallet2::get_subaddress_as_str ( const cryptonote::subaddress_index index) const

◆ get_subaddress_index()

boost::optional< cryptonote::subaddress_index > tools::wallet2::get_subaddress_index ( const cryptonote::account_public_address address) const

◆ get_subaddress_label()

std::string tools::wallet2::get_subaddress_label ( const cryptonote::subaddress_index index) const

◆ get_subaddress_lookahead()

std::pair<size_t, size_t> tools::wallet2::get_subaddress_lookahead ( ) const
inline

◆ get_subaddress_spend_public_key()

crypto::public_key tools::wallet2::get_subaddress_spend_public_key ( const cryptonote::subaddress_index index) const

◆ get_subaddress_spend_public_keys()

std::vector<crypto::public_key> tools::wallet2::get_subaddress_spend_public_keys ( uint32_t  account,
uint32_t  begin,
uint32_t  end 
) const

◆ get_transfer_details() [1/2]

size_t tools::wallet2::get_transfer_details ( const crypto::key_image ki) const
private

◆ get_transfer_details() [2/2]

const wallet2::transfer_details & tools::wallet2::get_transfer_details ( size_t  idx) const

◆ get_transfers()

void tools::wallet2::get_transfers ( wallet2::transfer_container incoming_transfers) const

◆ get_tx_device_aux()

std::string tools::wallet2::get_tx_device_aux ( const crypto::hash txid) const

◆ get_tx_key()

bool tools::wallet2::get_tx_key ( const crypto::hash txid,
crypto::secret_key tx_key,
std::vector< crypto::secret_key > &  additional_tx_keys 
)

◆ get_tx_key_cached()

bool tools::wallet2::get_tx_key_cached ( const crypto::hash txid,
crypto::secret_key tx_key,
std::vector< crypto::secret_key > &  additional_tx_keys 
) const

◆ get_tx_note()

std::string tools::wallet2::get_tx_note ( const crypto::hash txid) const

◆ get_tx_proof() [1/2]

std::string tools::wallet2::get_tx_proof ( const crypto::hash txid,
const cryptonote::account_public_address address,
bool  is_subaddress,
const std::string &  message 
)

◆ get_tx_proof() [2/2]

std::string tools::wallet2::get_tx_proof ( const cryptonote::transaction tx,
const crypto::secret_key tx_key,
const std::vector< crypto::secret_key > &  additional_tx_keys,
const cryptonote::account_public_address address,
bool  is_subaddress,
const std::string &  message 
) const

◆ get_tx_pub_key_from_received_outs()

crypto::public_key tools::wallet2::get_tx_pub_key_from_received_outs ( const tools::wallet2::transfer_details td) const

◆ get_unconfirmed_payments()

void tools::wallet2::get_unconfirmed_payments ( std::list< std::pair< crypto::hash, wallet2::pool_payment_details >> &  unconfirmed_payments,
const boost::optional< uint32_t > &  subaddr_account = boost::none,
const std::set< uint32_t > &  subaddr_indices = {} 
) const

◆ get_unconfirmed_payments_out()

void tools::wallet2::get_unconfirmed_payments_out ( std::list< std::pair< crypto::hash, wallet2::unconfirmed_transfer_details >> &  unconfirmed_payments,
const boost::optional< uint32_t > &  subaddr_account = boost::none,
const std::set< uint32_t > &  subaddr_indices = {} 
) const

◆ get_unspent_amounts_vector()

std::vector< uint64_t > tools::wallet2::get_unspent_amounts_vector ( ) const
private

◆ get_upper_transaction_weight_limit()

uint64_t tools::wallet2::get_upper_transaction_weight_limit ( ) const
private

◆ get_wallet_file()

std::string tools::wallet2::get_wallet_file ( ) const

◆ has_multisig_partial_key_images()

bool tools::wallet2::has_multisig_partial_key_images ( ) const

◆ has_stagenet_option()

bool tools::wallet2::has_stagenet_option ( const boost::program_options::variables_map &  vm)
static

◆ has_testnet_option()

bool tools::wallet2::has_testnet_option ( const boost::program_options::variables_map &  vm)
static

◆ has_unknown_key_images()

bool tools::wallet2::has_unknown_key_images ( ) const

◆ hash_m_transfer()

void tools::wallet2::hash_m_transfer ( const transfer_details transfer,
crypto::hash hash 
) const

◆ hash_m_transfers()

uint64_t tools::wallet2::hash_m_transfers ( int64_t  transfer_height,
crypto::hash hash 
) const

◆ ignore_fractional_outputs() [1/2]

bool tools::wallet2::ignore_fractional_outputs ( ) const
inline

◆ ignore_fractional_outputs() [2/2]

void tools::wallet2::ignore_fractional_outputs ( bool  value)
inline

◆ import_blockchain()

void tools::wallet2::import_blockchain ( const std::tuple< size_t, crypto::hash, std::vector< crypto::hash >> &  bc)

◆ import_key_images() [1/4]

uint64_t tools::wallet2::import_key_images ( const std::string &  filename,
uint64_t &  spent,
uint64_t &  unspent 
)

◆ import_key_images() [2/4]

uint64_t tools::wallet2::import_key_images ( const std::vector< std::pair< crypto::key_image, crypto::signature >> &  signed_key_images,
size_t  offset,
uint64_t &  spent,
uint64_t &  unspent,
bool  check_spent = true 
)

◆ import_key_images() [3/4]

bool tools::wallet2::import_key_images ( signed_tx_set signed_tx,
size_t  offset = 0,
bool  only_selected_transfers = false 
)

◆ import_key_images() [4/4]

bool tools::wallet2::import_key_images ( std::vector< crypto::key_image key_images,
size_t  offset = 0,
boost::optional< std::unordered_set< size_t >>  selected_transfers = boost::none 
)

◆ import_multisig()

size_t tools::wallet2::import_multisig ( std::vector< cryptonote::blobdata info)

Import a set of multisig info from multisig partners

Returns
the number of inputs which were imported

◆ import_outputs()

size_t tools::wallet2::import_outputs ( const std::pair< size_t, std::vector< tools::wallet2::transfer_details >> &  outputs)

◆ import_outputs_from_str()

size_t tools::wallet2::import_outputs_from_str ( const std::string &  outputs_st)

◆ import_payments()

void tools::wallet2::import_payments ( const payment_container payments)

◆ import_payments_out()

void tools::wallet2::import_payments_out ( const std::list< std::pair< crypto::hash, wallet2::confirmed_transfer_details >> &  confirmed_payments)

◆ init()

bool tools::wallet2::init ( std::string  daemon_address = "http://localhost:8080",
boost::optional< epee::net_utils::http::login >  daemon_login = boost::none,
boost::asio::ip::tcp::endpoint  proxy = {},
uint64_t  upper_transaction_weight_limit = 0,
bool  trusted_daemon = true,
epee::net_utils::ssl_options_t  ssl_options = epee::net_utils::ssl_support_t::e_ssl_support_autodetect,
std::string  blockchain_db_path = "" 
)

◆ init_options()

void tools::wallet2::init_options ( boost::program_options::options_description &  desc_params)
static

◆ init_type()

void tools::wallet2::init_type ( hw::device::device_type  device_type)
private

◆ invoke_http_bin()

template<class t_request , class t_response >
bool tools::wallet2::invoke_http_bin ( const boost::string_ref  uri,
const t_request &  req,
t_response &  res,
std::chrono::milliseconds  timeout = std::chrono::seconds(15),
const boost::string_ref  http_method = "GET" 
)
inline

◆ invoke_http_json()

template<class t_request , class t_response >
bool tools::wallet2::invoke_http_json ( const boost::string_ref  uri,
const t_request &  req,
t_response &  res,
std::chrono::milliseconds  timeout = std::chrono::seconds(15),
const boost::string_ref  http_method = "GET" 
)
inline

◆ invoke_http_json_rpc()

template<class t_request , class t_response >
bool tools::wallet2::invoke_http_json_rpc ( const boost::string_ref  uri,
const std::string &  method_name,
const t_request &  req,
t_response &  res,
std::chrono::milliseconds  timeout = std::chrono::seconds(15),
const boost::string_ref  http_method = "GET",
const std::string &  req_id = "0" 
)
inline

◆ is_deprecated()

bool tools::wallet2::is_deprecated ( ) const

Tells if the wallet file is deprecated.

◆ is_deterministic()

bool tools::wallet2::is_deterministic ( ) const

Checks if deterministic wallet.

◆ is_keys_file_locked()

bool tools::wallet2::is_keys_file_locked ( ) const

◆ is_output_blackballed()

bool tools::wallet2::is_output_blackballed ( const std::pair< uint64_t, uint64_t > &  output) const

◆ is_synced()

bool tools::wallet2::is_synced ( ) const

◆ is_transfer_unlocked() [1/2]

bool tools::wallet2::is_transfer_unlocked ( const transfer_details td) const

◆ is_transfer_unlocked() [2/2]

bool tools::wallet2::is_transfer_unlocked ( uint64_t  unlock_time,
uint64_t  block_height 
) const

◆ is_trusted_daemon()

bool tools::wallet2::is_trusted_daemon ( ) const
inline

◆ is_tx_spendtime_unlocked()

bool tools::wallet2::is_tx_spendtime_unlocked ( uint64_t  unlock_time,
uint64_t  block_height 
) const

◆ is_unattended()

bool tools::wallet2::is_unattended ( ) const
inline

◆ key_on_device()

bool tools::wallet2::key_on_device ( ) const
inline

◆ key_reuse_mitigation2() [1/2]

bool tools::wallet2::key_reuse_mitigation2 ( ) const
inline

◆ key_reuse_mitigation2() [2/2]

void tools::wallet2::key_reuse_mitigation2 ( bool  value)
inline

◆ light_wallet()

bool tools::wallet2::light_wallet ( ) const
inline

Checks if light wallet. A light wallet sends view key to a server where the blockchain is scanned.

◆ light_wallet_get_address_info()

bool tools::wallet2::light_wallet_get_address_info ( tools::COMMAND_RPC_GET_ADDRESS_INFO::response response)

◆ light_wallet_get_address_txs()

void tools::wallet2::light_wallet_get_address_txs ( )

◆ light_wallet_get_outs()

void tools::wallet2::light_wallet_get_outs ( std::vector< std::vector< get_outs_entry >> &  outs,
const std::vector< size_t > &  selected_transfers,
size_t  fake_outputs_count 
)

◆ light_wallet_get_unspent_outs()

void tools::wallet2::light_wallet_get_unspent_outs ( )

◆ light_wallet_import_wallet_request()

bool tools::wallet2::light_wallet_import_wallet_request ( tools::COMMAND_RPC_IMPORT_WALLET_REQUEST::response response)

◆ light_wallet_key_image_is_ours()

bool tools::wallet2::light_wallet_key_image_is_ours ( const crypto::key_image key_image,
const crypto::public_key tx_public_key,
uint64_t  out_index 
)

◆ light_wallet_login()

bool tools::wallet2::light_wallet_login ( bool new_address)

◆ light_wallet_parse_rct_str()

bool tools::wallet2::light_wallet_parse_rct_str ( const std::string &  rct_string,
const crypto::public_key tx_pub_key,
uint64_t  internal_output_index,
rct::key decrypted_mask,
rct::key rct_commit,
bool  decrypt 
) const

◆ load()

void tools::wallet2::load ( const std::string &  wallet,
const epee::wipeable_string &  password 
)

◆ load_keys()

bool tools::wallet2::load_keys ( const std::string &  keys_file_name,
const epee::wipeable_string &  password 
)
private

Load wallet information from wallet file.

Parameters
keys_file_nameName of wallet file
passwordPassword of wallet file

◆ load_multisig_tx()

bool tools::wallet2::load_multisig_tx ( cryptonote::blobdata  blob,
multisig_tx_set exported_txs,
std::function< bool(const multisig_tx_set &)>  accept_func = NULL 
)

◆ load_multisig_tx_from_file()

bool tools::wallet2::load_multisig_tx_from_file ( const std::string &  filename,
multisig_tx_set exported_txs,
std::function< bool(const multisig_tx_set &)>  accept_func = NULL 
)

◆ load_tx()

bool tools::wallet2::load_tx ( const std::string &  signed_filename,
std::vector< tools::wallet2::pending_tx > &  ptx,
std::function< bool(const signed_tx_set &)>  accept_func = NULL 
)

◆ load_unsigned_tx()

bool tools::wallet2::load_unsigned_tx ( const std::string &  unsigned_filename,
unsigned_tx_set exported_txs 
) const

◆ lock_keys_file()

bool tools::wallet2::lock_keys_file ( )

◆ lookup_device()

hw::device & tools::wallet2::lookup_device ( const std::string &  device_descriptor)
private

◆ make_dummy()

std::unique_ptr< wallet2 > tools::wallet2::make_dummy ( const boost::program_options::variables_map &  vm,
bool  unattended,
const std::function< boost::optional< password_container >(const char *, bool)> &  password_prompter 
)
static

Just parses variables.

◆ make_from_file()

std::pair< std::unique_ptr< wallet2 >, password_container > tools::wallet2::make_from_file ( const boost::program_options::variables_map &  vm,
bool  unattended,
const std::string &  wallet_file,
const std::function< boost::optional< password_container >(const char *, bool)> &  password_prompter 
)
static

Uses stdin and stdout. Returns a wallet2 and password for wallet_file if no errors.

◆ make_from_json()

std::pair< std::unique_ptr< wallet2 >, tools::password_container > tools::wallet2::make_from_json ( const boost::program_options::variables_map &  vm,
bool  unattended,
const std::string &  json_file,
const std::function< boost::optional< password_container >(const char *, bool)> &  password_prompter 
)
static

Uses stdin and stdout. Returns a wallet2 if no errors.

◆ make_multisig() [1/2]

std::string tools::wallet2::make_multisig ( const epee::wipeable_string &  password,
const std::vector< crypto::secret_key > &  view_keys,
const std::vector< crypto::public_key > &  spend_keys,
uint32_t  threshold 
)

Creates a multisig wallet.

Returns
empty if done, non empty if we need to send another string to other participants

◆ make_multisig() [2/2]

std::string tools::wallet2::make_multisig ( const epee::wipeable_string &  password,
const std::vector< std::string > &  info,
uint32_t  threshold 
)

Creates a multisig wallet.

Returns
empty if done, non empty if we need to send another string to other participants

◆ make_multisig_tx_set()

wallet2::multisig_tx_set tools::wallet2::make_multisig_tx_set ( const std::vector< pending_tx > &  ptx_vector) const

◆ make_new()

std::pair< std::unique_ptr< wallet2 >, password_container > tools::wallet2::make_new ( const boost::program_options::variables_map &  vm,
bool  unattended,
const std::function< boost::optional< password_container >(const char *, bool)> &  password_prompter 
)
static

Uses stdin and stdout. Returns a wallet2 and password for wallet with no file if no errors.

◆ make_uri()

std::string tools::wallet2::make_uri ( const std::string &  address,
const std::string &  payment_id,
uint64_t  amount,
const std::string &  tx_description,
const std::string &  recipient_name,
std::string &  error 
) const

◆ merge_destinations() [1/2]

bool tools::wallet2::merge_destinations ( ) const
inline

◆ merge_destinations() [2/2]

void tools::wallet2::merge_destinations ( bool  merge)
inline

◆ multisig()

bool tools::wallet2::multisig ( bool ready = NULL,
uint32_t *  threshold = NULL,
uint32_t *  total = NULL 
) const

◆ nettype()

cryptonote::network_type tools::wallet2::nettype ( ) const
inline

◆ on_device_button_pressed()

void tools::wallet2::on_device_button_pressed ( )
private

◆ on_device_button_request()

void tools::wallet2::on_device_button_request ( uint64_t  code)
private

◆ on_device_passphrase_request()

boost::optional< epee::wipeable_string > tools::wallet2::on_device_passphrase_request ( bool  on_device)
private

◆ on_device_pin_request()

boost::optional< epee::wipeable_string > tools::wallet2::on_device_pin_request ( )
private

◆ on_device_progress()

void tools::wallet2::on_device_progress ( const hw::device_progress event)
private

◆ parse_block_round()

void tools::wallet2::parse_block_round ( const cryptonote::blobdata blob,
cryptonote::block bl,
crypto::hash bl_id,
bool error 
) const
private

◆ parse_long_payment_id()

bool tools::wallet2::parse_long_payment_id ( const std::string &  payment_id_str,
crypto::hash payment_id 
)
static

◆ parse_multisig_tx_from_str()

bool tools::wallet2::parse_multisig_tx_from_str ( std::string  multisig_tx_st,
multisig_tx_set exported_txs 
) const

◆ parse_payment_id()

bool tools::wallet2::parse_payment_id ( const std::string &  payment_id_str,
crypto::hash payment_id 
)
static

◆ parse_short_payment_id()

bool tools::wallet2::parse_short_payment_id ( const std::string &  payment_id_str,
crypto::hash8 payment_id 
)
static

◆ parse_tx_from_str()

bool tools::wallet2::parse_tx_from_str ( const std::string &  signed_tx_st,
std::vector< tools::wallet2::pending_tx > &  ptx,
std::function< bool(const signed_tx_set &)>  accept_func 
)

◆ parse_unsigned_tx_from_str()

bool tools::wallet2::parse_unsigned_tx_from_str ( const std::string &  unsigned_tx_st,
unsigned_tx_set exported_txs 
) const

◆ parse_uri()

bool tools::wallet2::parse_uri ( const std::string &  uri,
std::string &  address,
std::string &  payment_id,
uint64_t &  amount,
std::string &  tx_description,
std::string &  recipient_name,
std::vector< std::string > &  unknown_parameters,
std::string &  error 
)

◆ path()

std::string tools::wallet2::path ( ) const

◆ pick_preferred_rct_inputs()

std::vector< size_t > tools::wallet2::pick_preferred_rct_inputs ( uint64_t  needed_money,
uint32_t  subaddr_account,
const std::set< uint32_t > &  subaddr_indices 
) const
private

◆ pop_best_value()

size_t tools::wallet2::pop_best_value ( std::vector< size_t > &  unused_dust_indices,
const std::vector< size_t > &  selected_transfers,
bool  smallest = false 
) const

◆ pop_best_value_from()

size_t tools::wallet2::pop_best_value_from ( const transfer_container transfers,
std::vector< size_t > &  unused_dust_indices,
const std::vector< size_t > &  selected_transfers,
bool  smallest = false 
) const

◆ prepare_file_names()

bool tools::wallet2::prepare_file_names ( const std::string &  file_path)
private

◆ print_ring_members() [1/2]

bool tools::wallet2::print_ring_members ( ) const
inline

◆ print_ring_members() [2/2]

void tools::wallet2::print_ring_members ( bool  value)
inline

◆ process_new_blockchain_entry()

void tools::wallet2::process_new_blockchain_entry ( const cryptonote::block b,
const cryptonote::block_complete_entry bche,
const parsed_block parsed_block,
const crypto::hash bl_id,
uint64_t  height,
const std::vector< tx_cache_data > &  tx_cache_data,
size_t  tx_cache_data_offset,
std::map< std::pair< uint64_t, uint64_t >, size_t > *  output_tracker_cache = NULL 
)
private

◆ process_new_transaction()

void tools::wallet2::process_new_transaction ( const crypto::hash txid,
const cryptonote::transaction tx,
const std::vector< uint64_t > &  o_indices,
uint64_t  height,
uint64_t  ts,
bool  miner_tx,
bool  pool,
bool  double_spend_seen,
const tx_cache_data tx_cache_data,
std::map< std::pair< uint64_t, uint64_t >, size_t > *  output_tracker_cache = NULL 
)
private

◆ process_outgoing()

void tools::wallet2::process_outgoing ( const crypto::hash txid,
const cryptonote::transaction tx,
uint64_t  height,
uint64_t  ts,
uint64_t  spent,
uint64_t  received,
uint32_t  subaddr_account,
const std::set< uint32_t > &  subaddr_indices 
)
private

◆ process_parsed_blocks()

void tools::wallet2::process_parsed_blocks ( uint64_t  start_height,
const std::vector< cryptonote::block_complete_entry > &  blocks,
const std::vector< parsed_block > &  parsed_blocks,
uint64_t &  blocks_added,
std::map< std::pair< uint64_t, uint64_t >, size_t > *  output_tracker_cache = NULL 
)
private

◆ process_unconfirmed()

void tools::wallet2::process_unconfirmed ( const crypto::hash txid,
const cryptonote::transaction tx,
uint64_t  height 
)
private

◆ pull_and_parse_next_blocks()

void tools::wallet2::pull_and_parse_next_blocks ( uint64_t  start_height,
uint64_t &  blocks_start_height,
std::list< crypto::hash > &  short_chain_history,
const std::vector< cryptonote::block_complete_entry > &  prev_blocks,
const std::vector< parsed_block > &  prev_parsed_blocks,
std::vector< cryptonote::block_complete_entry > &  blocks,
std::vector< parsed_block > &  parsed_blocks,
bool error 
)
private

◆ pull_blocks()

void tools::wallet2::pull_blocks ( uint64_t  start_height,
uint64_t &  blocks_start_height,
const std::list< crypto::hash > &  short_chain_history,
std::vector< cryptonote::block_complete_entry > &  blocks,
std::vector< cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices > &  o_indices 
)
private

◆ pull_hashes()

void tools::wallet2::pull_hashes ( uint64_t  start_height,
uint64_t &  blocks_start_height,
const std::list< crypto::hash > &  short_chain_history,
std::vector< crypto::hash > &  hashes 
)
private

◆ query_device()

bool tools::wallet2::query_device ( hw::device::device_type device_type,
const std::string &  keys_file_name,
const epee::wipeable_string &  password,
uint64_t  kdf_rounds = 1 
)
static

determine the key storage for the specified wallet file

Parameters
device_type(OUT) wallet backend as enumerated in hw::device::device_type
keys_file_nameKeys file to verify password for
passwordPassword to verify
Returns
true if password correct, else false

for verification only - determines key storage hardware

◆ reconnect_device()

bool tools::wallet2::reconnect_device ( )

◆ refresh() [1/4]

void tools::wallet2::refresh ( bool  trusted_daemon)

◆ refresh() [2/4]

bool tools::wallet2::refresh ( bool  trusted_daemon,
uint64_t &  blocks_fetched,
bool received_money,
bool ok 
)

◆ refresh() [3/4]

void tools::wallet2::refresh ( bool  trusted_daemon,
uint64_t  start_height,
uint64_t &  blocks_fetched 
)

◆ refresh() [4/4]

void tools::wallet2::refresh ( bool  trusted_daemon,
uint64_t  start_height,
uint64_t &  blocks_fetched,
bool received_money,
bool  check_pool = true 
)

◆ register_devices()

void tools::wallet2::register_devices ( )
private

◆ remove_obsolete_pool_txs()

void tools::wallet2::remove_obsolete_pool_txs ( const std::vector< crypto::hash > &  tx_hashes)

◆ remove_rings()

bool tools::wallet2::remove_rings ( const cryptonote::transaction_prefix tx)
private

◆ rescan_blockchain()

void tools::wallet2::rescan_blockchain ( bool  hard,
bool  refresh = true,
bool  keep_key_images = false 
)

◆ rescan_spent()

void tools::wallet2::rescan_spent ( )

◆ restore()

void tools::wallet2::restore ( const std::string &  wallet_,
const epee::wipeable_string &  password,
const std::string &  device_name,
bool  create_address_file = false 
)

Restore a wallet hold by an HW.

Creates a wallet from a device.

Parameters
wallet_Name of wallet file
passwordPassword of wallet file
device_namename of HW to use
create_address_fileWhether to create an address file
wallet_Name of wallet file
passwordPassword of wallet file
device_namedevice string address

◆ rewrite()

void tools::wallet2::rewrite ( const std::string &  wallet_name,
const epee::wipeable_string &  password 
)

Rewrites to the wallet file for wallet upgrade (doesn't generate key, assumes it's already there)

Parameters
wallet_nameName of wallet file (should exist)
passwordPassword for wallet file

◆ sanity_check()

bool tools::wallet2::sanity_check ( const std::vector< wallet2::pending_tx > &  ptx_vector,
std::vector< cryptonote::tx_destination_entry dsts 
) const

◆ save_multisig_tx() [1/4]

bool tools::wallet2::save_multisig_tx ( const multisig_tx_set txs,
const std::string &  filename 
)

◆ save_multisig_tx() [2/4]

std::string tools::wallet2::save_multisig_tx ( const std::vector< pending_tx > &  ptx_vector)

◆ save_multisig_tx() [3/4]

bool tools::wallet2::save_multisig_tx ( const std::vector< pending_tx > &  ptx_vector,
const std::string &  filename 
)

◆ save_multisig_tx() [4/4]

std::string tools::wallet2::save_multisig_tx ( multisig_tx_set  txs)

◆ save_tx()

bool tools::wallet2::save_tx ( const std::vector< pending_tx > &  ptx_vector,
const std::string &  filename 
) const

◆ scan_output()

void tools::wallet2::scan_output ( const cryptonote::transaction tx,
bool  miner_tx,
const crypto::public_key tx_pub_key,
size_t  i,
tx_scan_info_t tx_scan_info,
int &  num_vouts_received,
std::unordered_map< cryptonote::subaddress_index, uint64_t > &  tx_money_got_in_outs,
std::vector< size_t > &  outs,
bool  pool 
)
private

◆ segregate_pre_fork_outputs() [1/2]

bool tools::wallet2::segregate_pre_fork_outputs ( ) const
inline

◆ segregate_pre_fork_outputs() [2/2]

void tools::wallet2::segregate_pre_fork_outputs ( bool  value)
inline

◆ segregation_height() [1/2]

uint64_t tools::wallet2::segregation_height ( ) const
inline

◆ segregation_height() [2/2]

void tools::wallet2::segregation_height ( uint64_t  height)
inline

◆ select_available_mixable_outputs()

std::vector< size_t > tools::wallet2::select_available_mixable_outputs ( )

◆ select_available_outputs()

std::vector< size_t > tools::wallet2::select_available_outputs ( const std::function< bool(const transfer_details &td)> &  f) const

◆ select_available_outputs_from_histogram()

std::vector< size_t > tools::wallet2::select_available_outputs_from_histogram ( uint64_t  count,
bool  atleast,
bool  unlocked,
bool  allow_rct 
)

◆ select_available_unmixable_outputs()

std::vector< size_t > tools::wallet2::select_available_unmixable_outputs ( )

◆ select_transfers()

uint64_t tools::wallet2::select_transfers ( uint64_t  needed_money,
std::vector< size_t >  unused_transfers_indices,
std::vector< size_t > &  selected_transfers 
) const
private

◆ serialize()

template<class t_archive >
void tools::wallet2::serialize ( t_archive &  a,
const unsigned int  ver 
)
inline

◆ set_account_tag()

void tools::wallet2::set_account_tag ( const std::set< uint32_t > &  account_indices,
const std::string &  tag 
)

Set a tag to the given accounts.

Parameters
account_indicesIndices of accounts.
tagTag's name. If empty, the accounts become untagged.

◆ set_account_tag_description()

void tools::wallet2::set_account_tag_description ( const std::string &  tag,
const std::string &  description 
)

Set the label of the given tag.

Parameters
tagTag's name (which must be non-empty).
descriptionTag's description.

◆ set_attribute()

void tools::wallet2::set_attribute ( const std::string &  key,
const std::string &  value 
)

◆ set_blackballed_outputs()

bool tools::wallet2::set_blackballed_outputs ( const std::vector< std::pair< uint64_t, uint64_t >> &  outputs,
bool  add = false 
)

◆ set_confirm_backlog_threshold()

void tools::wallet2::set_confirm_backlog_threshold ( uint32_t  threshold)
inline

◆ set_daemon()

bool tools::wallet2::set_daemon ( std::string  daemon_address = "http://localhost:8080",
boost::optional< epee::net_utils::http::login >  daemon_login = boost::none,
bool  trusted_daemon = true,
epee::net_utils::ssl_options_t  ssl_options = epee::net_utils::ssl_support_t::e_ssl_support_autodetect 
)

◆ set_default_priority()

void tools::wallet2::set_default_priority ( uint32_t  p)
inline

◆ set_description()

void tools::wallet2::set_description ( const std::string &  description)

◆ set_light_wallet()

void tools::wallet2::set_light_wallet ( bool  light_wallet)
inline

◆ set_min_output_count()

void tools::wallet2::set_min_output_count ( uint32_t  count)
inline

◆ set_min_output_value()

void tools::wallet2::set_min_output_value ( uint64_t  value)
inline

◆ set_offline()

void tools::wallet2::set_offline ( bool  offline = true)

◆ set_refresh_from_block_height()

void tools::wallet2::set_refresh_from_block_height ( uint64_t  height)
inline

◆ set_refresh_type()

void tools::wallet2::set_refresh_type ( RefreshType  refresh_type)
inline

◆ set_ring()

bool tools::wallet2::set_ring ( const crypto::key_image key_image,
const std::vector< uint64_t > &  outs,
bool  relative 
)

◆ set_ring_database()

bool tools::wallet2::set_ring_database ( const std::string &  filename)

◆ set_seed_language()

void tools::wallet2::set_seed_language ( const std::string &  language)

Sets the seed language.

Parameters
languageSeed language to set to

◆ set_spent()

void tools::wallet2::set_spent ( size_t  idx,
uint64_t  height 
)
private

◆ set_subaddress_label()

void tools::wallet2::set_subaddress_label ( const cryptonote::subaddress_index index,
const std::string &  label 
)

◆ set_subaddress_lookahead()

void tools::wallet2::set_subaddress_lookahead ( size_t  major,
size_t  minor 
)

◆ set_trusted_daemon()

void tools::wallet2::set_trusted_daemon ( bool  trusted)
inline

◆ set_tx_device_aux()

void tools::wallet2::set_tx_device_aux ( const crypto::hash txid,
const std::string &  aux 
)

◆ set_tx_key()

void tools::wallet2::set_tx_key ( const crypto::hash txid,
const crypto::secret_key tx_key,
const std::vector< crypto::secret_key > &  additional_tx_keys 
)

◆ set_tx_note()

void tools::wallet2::set_tx_note ( const crypto::hash txid,
const std::string &  note 
)

◆ set_tx_notify()

void tools::wallet2::set_tx_notify ( const std::shared_ptr< tools::Notify > &  notify)
inline

◆ set_unspent()

void tools::wallet2::set_unspent ( size_t  idx)
private

◆ setup_background_mining() [1/2]

BackgroundMiningSetupType tools::wallet2::setup_background_mining ( ) const
inline

◆ setup_background_mining() [2/2]

void tools::wallet2::setup_background_mining ( BackgroundMiningSetupType  value)
inline

◆ setup_keys()

void tools::wallet2::setup_keys ( const epee::wipeable_string &  password)
private

◆ setup_new_blockchain()

void tools::wallet2::setup_new_blockchain ( )
private

◆ should_pick_a_second_output()

bool tools::wallet2::should_pick_a_second_output ( bool  use_rct,
size_t  n_transfers,
const std::vector< size_t > &  unused_transfers_indices,
const std::vector< size_t > &  unused_dust_indices 
) const
private

◆ should_skip_block()

bool tools::wallet2::should_skip_block ( const cryptonote::block b,
uint64_t  height 
) const
private

◆ sign()

std::string tools::wallet2::sign ( const std::string &  data) const

◆ sign_multisig_participant()

std::string tools::wallet2::sign_multisig_participant ( const std::string &  data) const

sign_multisig_participant signs given message with the multisig public signer key

Parameters
datamessage to sign
Exceptions
ifwallet is not multisig
Returns
signature

◆ sign_multisig_tx()

bool tools::wallet2::sign_multisig_tx ( multisig_tx_set exported_txs,
std::vector< crypto::hash > &  txids 
)

◆ sign_multisig_tx_from_file()

bool tools::wallet2::sign_multisig_tx_from_file ( const std::string &  filename,
std::vector< crypto::hash > &  txids,
std::function< bool(const multisig_tx_set &)>  accept_func 
)

◆ sign_multisig_tx_to_file()

bool tools::wallet2::sign_multisig_tx_to_file ( multisig_tx_set exported_txs,
const std::string &  filename,
std::vector< crypto::hash > &  txids 
)

◆ sign_tx() [1/3]

bool tools::wallet2::sign_tx ( const std::string &  unsigned_filename,
const std::string &  signed_filename,
std::vector< wallet2::pending_tx > &  ptx,
std::function< bool(const unsigned_tx_set &)>  accept_func = NULL,
bool  export_raw = false 
)

◆ sign_tx() [2/3]

bool tools::wallet2::sign_tx ( unsigned_tx_set exported_txs,
const std::string &  signed_filename,
std::vector< wallet2::pending_tx > &  ptx,
bool  export_raw = false 
)

◆ sign_tx() [3/3]

bool tools::wallet2::sign_tx ( unsigned_tx_set exported_txs,
std::vector< wallet2::pending_tx > &  ptx,
signed_tx_set signed_txs 
)

◆ sign_tx_dump_to_str()

std::string tools::wallet2::sign_tx_dump_to_str ( unsigned_tx_set exported_txs,
std::vector< wallet2::pending_tx > &  ptx,
signed_tx_set signed_txes 
)

◆ stop()

void tools::wallet2::stop ( )
inline

◆ store()

void tools::wallet2::store ( )

◆ store_keys()

bool tools::wallet2::store_keys ( const std::string &  keys_file_name,
const epee::wipeable_string &  password,
bool  watch_only = false 
)
private

Stores wallet information to wallet file.

Parameters
keys_file_nameName of wallet file
passwordPassword of wallet file
watch_onlytrue to save only view key, false to save both spend and view keys
Returns
Whether it was successful.

◆ store_to()

void tools::wallet2::store_to ( const std::string &  path,
const epee::wipeable_string &  password 
)

store_to Stores wallet to another file(s), deleting old ones

Parameters
pathPath to the wallet file (keys and address filenames will be generated based on this filename)
passwordPassword to protect new wallet (TODO: probably better save the password in the wallet object?)

◆ store_tx_info() [1/2]

bool tools::wallet2::store_tx_info ( ) const
inline

◆ store_tx_info() [2/2]

void tools::wallet2::store_tx_info ( bool  store)
inline

◆ thaw() [1/2]

void tools::wallet2::thaw ( const crypto::key_image ki)

◆ thaw() [2/2]

void tools::wallet2::thaw ( size_t  idx)

◆ throw_on_rpc_response_error()

void tools::wallet2::throw_on_rpc_response_error ( const boost::optional< std::string > &  status,
const char *  method 
) const
private

◆ tr()

const char * tools::wallet2::tr ( const char *  str)
static

◆ track_uses() [1/2]

bool tools::wallet2::track_uses ( ) const
inline

◆ track_uses() [2/2]

void tools::wallet2::track_uses ( bool  value)
inline

◆ transfer_selected() [1/2]

template<typename T >
void tools::wallet2::transfer_selected ( const std::vector< cryptonote::tx_destination_entry > &  dsts,
const std::vector< size_t > &  selected_transfers,
size_t  fake_outputs_count,
std::vector< std::vector< tools::wallet2::get_outs_entry >> &  outs,
uint64_t  unlock_time,
uint64_t  fee,
const std::vector< uint8_t > &  extra,
T  destination_split_strategy,
const tx_dust_policy dust_policy,
cryptonote::transaction tx,
pending_tx ptx 
)

◆ transfer_selected() [2/2]

template<typename T >
void tools::wallet2::transfer_selected ( const std::vector< cryptonote::tx_destination_entry > &  dsts,
const std::vector< size_t > &  selected_transfers,
size_t  fake_outputs_count,
std::vector< std::vector< tools::wallet2::get_outs_entry >> &  outs,
uint64_t  unlock_time,
uint64_t  fee,
const std::vector< uint8_t > &  extra,
T  destination_split_strategy,
const tx_dust_policy dust_policy,
cryptonote::transaction tx,
pending_tx ptx 
)

◆ transfer_selected_rct()

void tools::wallet2::transfer_selected_rct ( std::vector< cryptonote::tx_destination_entry dsts,
const std::vector< size_t > &  selected_transfers,
size_t  fake_outputs_count,
std::vector< std::vector< tools::wallet2::get_outs_entry >> &  outs,
uint64_t  unlock_time,
uint64_t  fee,
const std::vector< uint8_t > &  extra,
cryptonote::transaction tx,
pending_tx ptx,
const rct::RCTConfig rct_config 
)

◆ trim_hashchain()

void tools::wallet2::trim_hashchain ( )
private

◆ tx_add_fake_output()

bool tools::wallet2::tx_add_fake_output ( std::vector< std::vector< tools::wallet2::get_outs_entry >> &  outs,
uint64_t  global_index,
const crypto::public_key tx_public_key,
const rct::key mask,
uint64_t  real_index,
bool  unlocked 
) const
private

◆ unblackball_output()

bool tools::wallet2::unblackball_output ( const std::pair< uint64_t, uint64_t > &  output)

◆ unlock_keys_file()

bool tools::wallet2::unlock_keys_file ( )

◆ unlocked_balance()

uint64_t tools::wallet2::unlocked_balance ( uint32_t  subaddr_index_major,
uint64_t *  blocks_to_unlock = NULL 
) const

◆ unlocked_balance_all()

uint64_t tools::wallet2::unlocked_balance_all ( uint64_t *  blocks_to_unlock = NULL) const

◆ unlocked_balance_per_subaddress()

std::map< uint32_t, std::pair< uint64_t, uint64_t > > tools::wallet2::unlocked_balance_per_subaddress ( uint32_t  subaddr_index_major) const

◆ unpack_extra_multisig_info()

bool tools::wallet2::unpack_extra_multisig_info ( const std::vector< std::string > &  info,
std::vector< crypto::public_key > &  signers,
std::unordered_set< crypto::public_key > &  pkeys 
) const
private

◆ unpack_multisig_info()

void tools::wallet2::unpack_multisig_info ( const std::vector< std::string > &  info,
std::vector< crypto::public_key > &  public_keys,
std::vector< crypto::secret_key > &  secret_keys 
) const
private

◆ unset_ring() [1/2]

bool tools::wallet2::unset_ring ( const crypto::hash txid)

◆ unset_ring() [2/2]

bool tools::wallet2::unset_ring ( const std::vector< crypto::key_image > &  key_images)

◆ update_multisig_rescan_info()

void tools::wallet2::update_multisig_rescan_info ( const std::vector< std::vector< rct::key >> &  multisig_k,
const std::vector< std::vector< tools::wallet2::multisig_info >> &  info,
size_t  n 
)
private

◆ update_pool_state()

void tools::wallet2::update_pool_state ( bool  refreshed = false)

◆ use_fork_rules()

bool tools::wallet2::use_fork_rules ( uint8_t  version,
int64_t  early_blocks = 0 
) const

◆ verify()

bool tools::wallet2::verify ( const std::string &  data,
const cryptonote::account_public_address address,
const std::string &  signature 
) const

◆ verify_extra_multisig_info()

bool tools::wallet2::verify_extra_multisig_info ( const std::string &  data,
std::unordered_set< crypto::public_key > &  pkeys,
crypto::public_key signer 
)
static

Verifies and extracts keys from a packaged multisig information string

◆ verify_multisig_info()

bool tools::wallet2::verify_multisig_info ( const std::string &  data,
crypto::secret_key skey,
crypto::public_key pkey 
)
static

Verifies and extracts keys from a packaged multisig information string

◆ verify_password() [1/2]

bool tools::wallet2::verify_password ( const epee::wipeable_string &  password)

verifies given password is correct for default wallet keys file

verify password for default wallet keys file.

Parameters
passwordPassword to verify
Returns
true if password is correct

for verification only should not mutate state, unlike load_keys() can be used prior to rewriting wallet keys file, to ensure user has entered the correct password

◆ verify_password() [2/2]

bool tools::wallet2::verify_password ( const std::string &  keys_file_name,
const epee::wipeable_string &  password,
bool  no_spend_key,
hw::device hwdev,
uint64_t  kdf_rounds 
)
static

verify password for specified wallet keys file.

Parameters
keys_file_nameKeys file to verify password for
passwordPassword to verify
no_spend_keyIf set = only verify view keys, otherwise also spend keys
hwdevThe hardware device to use
Returns
true if password is correct

for verification only should not mutate state, unlike load_keys() can be used prior to rewriting wallet keys file, to ensure user has entered the correct password

◆ verify_with_public_key()

bool tools::wallet2::verify_with_public_key ( const std::string &  data,
const crypto::public_key public_key,
const std::string &  signature 
) const

verify_with_public_key verifies message was signed with given public key

Parameters
datamessage
public_keypublic key to check signature
signaturesignature of the message
Returns
true if the signature is correct

◆ wallet_exists()

void tools::wallet2::wallet_exists ( const std::string &  file_path,
bool keys_file_exists,
bool wallet_file_exists 
)
static

Check if wallet keys and bin files exist.

Parameters
file_pathWallet file path
keys_file_existsWhether keys file exists
wallet_file_existsWhether bin file exists

◆ wallet_valid_path_format()

bool tools::wallet2::wallet_valid_path_format ( const std::string &  file_path)
static

◆ watch_only()

bool tools::wallet2::watch_only ( ) const
inline

◆ write_watch_only_wallet()

void tools::wallet2::write_watch_only_wallet ( const std::string &  wallet_name,
const epee::wipeable_string &  password,
std::string &  new_keys_filename 
)

Writes to a file named based on the normal wallet (doesn't generate key, assumes it's already there)

Parameters
wallet_nameBase name of wallet file
passwordPassword for wallet file
new_keys_filename[OUT] Name of new keys file

Friends And Related Function Documentation

◆ ::Serialization_portability_wallet_Test

friend class ::Serialization_portability_wallet_Test
friend

◆ ::wallet_accessor_test

friend class ::wallet_accessor_test
friend

◆ wallet_device_callback

friend class wallet_device_callback
friend

◆ wallet_keys_unlocker

friend class wallet_keys_unlocker
friend

Member Data Documentation

◆ ATTRIBUTE_DESCRIPTION

const char* const tools::wallet2::ATTRIBUTE_DESCRIPTION = "wallet2.description"

◆ fallback_to_pow_checkpoint_hash

std::string tools::wallet2::fallback_to_pow_checkpoint_hash
private

◆ fallback_to_pow_checkpoint_height

uint64_t tools::wallet2::fallback_to_pow_checkpoint_height
private

◆ is_old_file_format

bool tools::wallet2::is_old_file_format
private

Whether the wallet file is of an old file format

◆ m_account

cryptonote::account_base tools::wallet2::m_account
private

◆ m_account_major_offset

uint32_t tools::wallet2::m_account_major_offset
private

◆ m_account_public_address

cryptonote::account_public_address tools::wallet2::m_account_public_address
private

◆ m_account_tags

std::pair<std::map<std::string, std::string>, std::vector<std::string> > tools::wallet2::m_account_tags
private

◆ m_additional_tx_keys

std::unordered_map<crypto::hash, std::vector<crypto::secret_key> > tools::wallet2::m_additional_tx_keys
private

◆ m_address_book

std::vector<tools::wallet2::address_book_row> tools::wallet2::m_address_book
private

◆ m_always_confirm_transfers

bool tools::wallet2::m_always_confirm_transfers
private

◆ m_ask_password

AskPasswordType tools::wallet2::m_ask_password
private

◆ m_attributes

std::unordered_map<std::string, std::string> tools::wallet2::m_attributes
private

◆ m_auto_low_priority

bool tools::wallet2::m_auto_low_priority
private

◆ m_auto_refresh

bool tools::wallet2::m_auto_refresh
private

◆ m_blockchain

hashchain tools::wallet2::m_blockchain
private

◆ m_cache_key

crypto::chacha_key tools::wallet2::m_cache_key
private

◆ m_callback

i_wallet2_callback* tools::wallet2::m_callback
private

◆ m_checkpoints

cryptonote::checkpoints tools::wallet2::m_checkpoints
private

◆ m_cold_key_images

std::unordered_map<crypto::public_key, crypto::key_image> tools::wallet2::m_cold_key_images
private

◆ m_confirm_backlog

bool tools::wallet2::m_confirm_backlog
private

◆ m_confirm_backlog_threshold

uint32_t tools::wallet2::m_confirm_backlog_threshold
private

◆ m_confirm_export_overwrite

bool tools::wallet2::m_confirm_export_overwrite
private

◆ m_confirm_missing_payment_id

bool tools::wallet2::m_confirm_missing_payment_id
private

◆ m_confirm_non_default_ring_size

bool tools::wallet2::m_confirm_non_default_ring_size
private

◆ m_confirmed_txs

std::unordered_map<crypto::hash, confirmed_transfer_details> tools::wallet2::m_confirmed_txs
private

◆ m_daemon_address

std::string tools::wallet2::m_daemon_address
private

◆ m_daemon_login

boost::optional<epee::net_utils::http::login> tools::wallet2::m_daemon_login
private

◆ m_daemon_rpc_mutex

boost::recursive_mutex tools::wallet2::m_daemon_rpc_mutex
private

◆ m_default_mixin

uint32_t tools::wallet2::m_default_mixin
private

◆ m_default_priority

uint32_t tools::wallet2::m_default_priority
private

◆ m_device_callback

std::unique_ptr<wallet_device_callback> tools::wallet2::m_device_callback
private

◆ m_device_derivation_path

std::string tools::wallet2::m_device_derivation_path
private

◆ m_device_last_key_image_sync

uint64_t tools::wallet2::m_device_last_key_image_sync
private

◆ m_device_name

std::string tools::wallet2::m_device_name
private

◆ m_devices_registered

bool tools::wallet2::m_devices_registered
private

◆ m_display_progress_indicator

bool tools::wallet2::m_display_progress_indicator
private

◆ m_encrypt_keys_after_refresh

boost::optional<epee::wipeable_string> tools::wallet2::m_encrypt_keys_after_refresh
private

◆ m_explicit_refresh_from_block_height

bool tools::wallet2::m_explicit_refresh_from_block_height
private

◆ m_first_refresh_done

bool tools::wallet2::m_first_refresh_done
private

◆ m_http_client

epee::net_utils::http::http_simple_client tools::wallet2::m_http_client
private

◆ m_ignore_fractional_outputs

bool tools::wallet2::m_ignore_fractional_outputs
private

◆ m_is_initialized

bool tools::wallet2::m_is_initialized
private

◆ m_kdf_rounds

uint64_t tools::wallet2::m_kdf_rounds
private

◆ m_key_device_type

hw::device::device_type tools::wallet2::m_key_device_type
private

◆ m_key_image_cache

std::unordered_map<crypto::public_key, std::map<uint64_t, crypto::key_image> > tools::wallet2::m_key_image_cache
private

◆ m_key_images

std::unordered_map<crypto::key_image, size_t> tools::wallet2::m_key_images
private

◆ m_key_reuse_mitigation2

bool tools::wallet2::m_key_reuse_mitigation2
private

◆ m_keys_file

std::string tools::wallet2::m_keys_file
private

◆ m_keys_file_locker

std::unique_ptr<tools::file_locker> tools::wallet2::m_keys_file_locker
private

◆ m_last_block_reward

uint64_t tools::wallet2::m_last_block_reward
private

◆ m_light_wallet

bool tools::wallet2::m_light_wallet
private

◆ m_light_wallet_address_txs

std::unordered_map<crypto::hash, address_tx> tools::wallet2::m_light_wallet_address_txs
private

◆ m_light_wallet_balance

uint64_t tools::wallet2::m_light_wallet_balance
private

◆ m_light_wallet_blockchain_height

uint64_t tools::wallet2::m_light_wallet_blockchain_height
private

◆ m_light_wallet_connected

bool tools::wallet2::m_light_wallet_connected
private

◆ m_light_wallet_per_kb_fee

uint64_t tools::wallet2::m_light_wallet_per_kb_fee = FEE_PER_KB
private

◆ m_light_wallet_scanned_block_height

uint64_t tools::wallet2::m_light_wallet_scanned_block_height
private

◆ m_light_wallet_unlocked_balance

uint64_t tools::wallet2::m_light_wallet_unlocked_balance
private

◆ m_merge_destinations

bool tools::wallet2::m_merge_destinations
private

◆ m_message_store

mms::message_store tools::wallet2::m_message_store
private

◆ m_min_output_count

uint32_t tools::wallet2::m_min_output_count
private

◆ m_min_output_value

uint64_t tools::wallet2::m_min_output_value
private

◆ m_mms_file

std::string tools::wallet2::m_mms_file
private

◆ m_multisig

bool tools::wallet2::m_multisig
private

if > 1 spend secret key will not match spend public key

◆ m_multisig_derivations

std::vector<crypto::public_key> tools::wallet2::m_multisig_derivations
private

◆ m_multisig_rescan_info

const std::vector<std::vector<tools::wallet2::multisig_info> >* tools::wallet2::m_multisig_rescan_info
private

◆ m_multisig_rescan_k

const std::vector<std::vector<rct::key> >* tools::wallet2::m_multisig_rescan_k
private

◆ m_multisig_rounds_passed

uint32_t tools::wallet2::m_multisig_rounds_passed
private

◆ m_multisig_signers

std::vector<crypto::public_key> tools::wallet2::m_multisig_signers
private

◆ m_multisig_threshold

uint32_t tools::wallet2::m_multisig_threshold
private

◆ m_nettype

cryptonote::network_type tools::wallet2::m_nettype
private

◆ m_node_rpc_proxy

NodeRPCProxy tools::wallet2::m_node_rpc_proxy
private

◆ m_offline

bool tools::wallet2::m_offline
private

◆ m_original_address

cryptonote::account_public_address tools::wallet2::m_original_address
private

◆ m_original_keys_available

bool tools::wallet2::m_original_keys_available
private

◆ m_original_view_secret_key

crypto::secret_key tools::wallet2::m_original_view_secret_key
private

◆ m_payments

payment_container tools::wallet2::m_payments
private

◆ m_print_ring_members

bool tools::wallet2::m_print_ring_members
private

◆ m_pub_keys

std::unordered_map<crypto::public_key, size_t> tools::wallet2::m_pub_keys
private

◆ m_refresh_from_block_height

uint64_t tools::wallet2::m_refresh_from_block_height
private

◆ m_refresh_type

RefreshType tools::wallet2::m_refresh_type
private

◆ m_ring_database

std::string tools::wallet2::m_ring_database
private

◆ m_ring_history_saved

bool tools::wallet2::m_ring_history_saved
private

◆ m_ringdb

std::unique_ptr<ringdb> tools::wallet2::m_ringdb
private

◆ m_ringdb_key

boost::optional<crypto::chacha_key> tools::wallet2::m_ringdb_key
private

◆ m_run

std::atomic<bool> tools::wallet2::m_run
private

◆ m_scanned_pool_txs

std::unordered_set<crypto::hash> tools::wallet2::m_scanned_pool_txs[2]
private

◆ m_segregate_pre_fork_outputs

bool tools::wallet2::m_segregate_pre_fork_outputs
private

◆ m_segregation_height

uint64_t tools::wallet2::m_segregation_height
private

◆ m_setup_background_mining

BackgroundMiningSetupType tools::wallet2::m_setup_background_mining
private

◆ m_store_tx_info

bool tools::wallet2::m_store_tx_info
private

request txkey to be returned in RPC, and store in the wallet cache file

◆ m_subaddress_labels

std::vector<std::vector<std::string> > tools::wallet2::m_subaddress_labels
private

◆ m_subaddress_lookahead_major

size_t tools::wallet2::m_subaddress_lookahead_major
private

◆ m_subaddress_lookahead_minor

size_t tools::wallet2::m_subaddress_lookahead_minor
private

◆ m_subaddresses

std::unordered_map<crypto::public_key, cryptonote::subaddress_index> tools::wallet2::m_subaddresses
private

◆ m_track_uses

bool tools::wallet2::m_track_uses
private

◆ m_transfers

transfer_container tools::wallet2::m_transfers
private

◆ m_trusted_daemon

bool tools::wallet2::m_trusted_daemon
private

◆ m_tx_device

std::unordered_map<crypto::hash, std::string> tools::wallet2::m_tx_device
private

◆ m_tx_keys

std::unordered_map<crypto::hash, crypto::secret_key> tools::wallet2::m_tx_keys
private

◆ m_tx_notes

std::unordered_map<crypto::hash, std::string> tools::wallet2::m_tx_notes
private

◆ m_tx_notify

std::shared_ptr<tools::Notify> tools::wallet2::m_tx_notify
private

◆ m_unattended

bool tools::wallet2::m_unattended
private

◆ m_unconfirmed_payments

std::unordered_multimap<crypto::hash, pool_payment_details> tools::wallet2::m_unconfirmed_payments
private

◆ m_unconfirmed_txs

std::unordered_map<crypto::hash, unconfirmed_transfer_details> tools::wallet2::m_unconfirmed_txs
private

◆ m_upper_transaction_weight_limit

uint64_t tools::wallet2::m_upper_transaction_weight_limit
private

◆ m_use_dns

bool tools::wallet2::m_use_dns
private

◆ m_wallet_file

std::string tools::wallet2::m_wallet_file
private

◆ m_watch_only

bool tools::wallet2::m_watch_only
private

no spend key

◆ rpc_timeout

constexpr const std::chrono::seconds tools::wallet2::rpc_timeout = std::chrono::minutes(3) + std::chrono::seconds(30)
staticconstexpr

◆ seed_language

std::string tools::wallet2::seed_language
private

Language of the mnemonics (seed).


The documentation for this class was generated from the following files: