Monero
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Static 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  background_sync_data_t
 
struct  background_synced_tx_t
 
struct  cache_file_data
 
struct  confirmed_transfer_details
 
struct  detached_blockchain_data
 
struct  exported_transfer_details
 
struct  is_out_data
 
struct  keys_file_data
 
struct  message_signature_result_t
 
struct  multisig_info
 
struct  multisig_sig
 
struct  multisig_tx_set
 
struct  parsed_block
 
struct  payment_details
 
struct  pending_tx
 
struct  pool_payment_details
 
struct  process_tx_entry_t
 
struct  reserve_proof_entry
 
struct  signed_tx_set
 
struct  transfer_details
 
struct  tx_cache_data
 
struct  tx_construction_data
 
struct  tx_entry_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 }
 
enum  BackgroundSyncType { BackgroundSyncOff = 0, BackgroundSyncReusePassword = 1, BackgroundSyncCustomPassword = 2 }
 
enum  ExportFormat { Binary = 0, Ascii }
 
enum  message_signature_type_t { sign_with_spend_key, sign_with_view_key }
 
typedef std::vector< uint64_tamounts_container
 
typedef std::vector< transfer_detailstransfer_container
 
typedef serializable_unordered_multimap< crypto::hash, payment_detailspayment_container
 
typedef std::set< uint32_tunique_index_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, std::unique_ptr< epee::net_utils::http::http_client_factory > http_client_factory=std::unique_ptr< epee::net_utils::http::http_client_factory >(new net::http::client_factory()))
 
 ~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. Assumes the multisig setup has already completed for the provided multisig info. 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 > &kex_messages, const std::uint32_t threshold)
 Creates a multisig wallet. More...
 
std::string exchange_multisig_keys (const epee::wipeable_string &password, const std::vector< std::string > &kex_messages, const bool force_update_use_with_caution=false)
 Increment the multisig key exchange round. More...
 
std::string get_multisig_first_kex_msg () const
 Get initial message to start multisig key exchange (before 'make_multisig()' is called) More...
 
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, const std::string &keys_buf="", const std::string &cache_buf="")
 
void store ()
 
void store_to (const std::string &path, const epee::wipeable_string &password, bool force_rewrite_keys=false)
 store_to Stores wallet to another file(s), deleting old ones More...
 
boost::optional< wallet2::keys_file_dataget_keys_file_data (const epee::wipeable_string &password, bool watch_only)
 get_keys_file_data Get wallet keys data which can be stored to a wallet file. More...
 
boost::optional< wallet2::cache_file_dataget_cache_file_data ()
 get_cache_file_data Get wallet cache data which can be stored to a wallet file. More...
 
std::string path () const
 
bool has_proxy_option () const
 has_proxy_option Check the global proxy (–proxy) has been defined or not. More...
 
bool verify_password (const epee::wipeable_string &password)
 verifies given password is correct for default wallet keys file More...
 
bool verify_password (const epee::wipeable_string &password, crypto::secret_key &spend_key_out)
 
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
 
void max_reorg_depth (uint64_t depth)
 
uint64_t max_reorg_depth () const
 
bool deinit ()
 
bool init (std::string daemon_address="http://localhost:8080", boost::optional< epee::net_utils::http::login > daemon_login=boost::none, const std::string &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)
 
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, const std::string &proxy="")
 
bool set_proxy (const std::string &address)
 
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)
 
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)
 
void create_one_off_subaddress (const cryptonote::subaddress_index &index)
 
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
 
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 try_incremental=true, uint64_t max_blocks=std::numeric_limits< uint64_t >::max())
 
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 is_background_wallet () 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()) 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, bool strict) const
 
uint64_t unlocked_balance (uint32_t subaddr_index_major, bool strict, uint64_t *blocks_to_unlock=NULL, uint64_t *time_to_unlock=NULL)
 
std::map< uint32_t, uint64_tbalance_per_subaddress (uint32_t subaddr_index_major, bool strict) const
 
std::map< uint32_t, std::pair< uint64_t, std::pair< uint64_t, uint64_t > > > unlocked_balance_per_subaddress (uint32_t subaddr_index_major, bool strict)
 
uint64_t balance_all (bool strict) const
 
uint64_t unlocked_balance_all (bool strict, uint64_t *blocks_to_unlock=NULL, uint64_t *time_to_unlock=NULL)
 
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, std::unordered_set< crypto::public_key > &valid_public_keys_cache, 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, const bool use_view_tags)
 
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, std::unordered_set< crypto::public_key > &valid_public_keys_cache, uint64_t fee, const std::vector< uint8_t > &extra, cryptonote::transaction &tx, pending_tx &ptx, const rct::RCTConfig &rct_config, const bool use_view_tags)
 
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, uint32_t priority, const std::vector< uint8_t > &extra, uint32_t subaddr_account, std::set< uint32_t > subaddr_indices, const unique_index_container &subtract_fee_from_outputs={})
 
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, 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, 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, uint32_t priority, const std::vector< uint8_t > &extra)
 
bool sanity_check (const std::vector< wallet2::pending_tx > &ptx_vector, const std::vector< cryptonote::tx_destination_entry > &dsts, const unique_index_container &subtract_fee_from_outputs={}) 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)
 
void device_show_address (uint32_t account_index, uint32_t address_index, const boost::optional< crypto::hash8 > &payment_id)
 
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, bool *wallet_is_outdated=NULL, bool *daemon_is_outdated=NULL)
 
bool check_version (uint32_t *version, bool *wallet_is_outdated, bool *daemon_is_outdated)
 
bool check_hard_fork_version (cryptonote::network_type nettype, const std::vector< std::pair< uint8_t, uint64_t >> &daemon_hard_forks, const uint64_t height, const uint64_t target_height, bool *wallet_is_outdated, bool *daemon_is_outdated)
 
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)
 
bool is_transfer_unlocked (uint64_t unlock_time, uint64_t block_height)
 
uint64_t get_last_block_reward () const
 
uint64_t get_device_last_key_image_sync () const
 
std::vector< cryptonote::public_nodeget_public_nodes (bool white_only=true)
 
template<class t_archive >
void serialize (t_archive &a, const unsigned int ver)
 
 if (version< 1)
 
 if (version< 2)
 
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)
 
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)
 
uint64_t ignore_outputs_above () const
 
void ignore_outputs_above (uint64_t value)
 
uint64_t ignore_outputs_below () const
 
void ignore_outputs_below (uint64_t value)
 
bool track_uses () const
 
void track_uses (bool value)
 
BackgroundSyncType background_sync_type () const
 
void setup_background_sync (BackgroundSyncType background_sync_type, const epee::wipeable_string &wallet_password, const boost::optional< epee::wipeable_string > &background_cache_password)
 
bool is_background_syncing () const
 
bool show_wallet_name_when_locked () const
 
void show_wallet_name_when_locked (bool value)
 
BackgroundMiningSetupType setup_background_mining () const
 
void setup_background_mining (BackgroundMiningSetupType value)
 
uint32_t inactivity_lock_timeout () const
 
void inactivity_lock_timeout (uint32_t seconds)
 
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)
 
const ExportFormatexport_format () const
 
void set_export_format (const ExportFormat &export_format)
 
bool load_deprecated_formats () const
 
void load_deprecated_formats (bool load)
 
bool persistent_rpc_client_id () const
 
void persistent_rpc_client_id (bool persistent)
 
void auto_mine_for_rpc_payment_threshold (float threshold)
 
float auto_mine_for_rpc_payment_threshold () const
 
crypto::secret_key get_rpc_client_secret_key () const
 
void set_rpc_client_secret_key (const crypto::secret_key &key)
 
uint64_t credits_target () const
 
void credits_target (uint64_t threshold)
 
bool is_multisig_enabled () const
 
void enable_multisig (bool enable)
 
bool is_mismatched_daemon_version_allowed () const
 
void allow_mismatched_daemon_version (bool allow_mismatch)
 
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, const boost::optional< cryptonote::account_public_address > &single_destination_subaddress=boost::none)
 
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
 
bool is_out_to_acc (const cryptonote::account_public_address &address, const crypto::public_key &out_key, const crypto::key_derivation &derivation, const std::vector< crypto::key_derivation > &additional_derivations, const size_t output_index, const boost::optional< crypto::view_tag > &view_tag_opt, crypto::key_derivation &found_derivation) 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)
 
void scan_tx (const std::unordered_set< crypto::hash > &txids)
 
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::hash8 *payment_id, const std::string &description, bool is_subaddress)
 
bool set_address_book_row (size_t row_id, const cryptonote::account_public_address &address, const crypto::hash8 *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
 
uint8_t get_current_hard_fork ()
 
void get_hard_fork_info (uint8_t version, uint64_t &earliest_height)
 
bool use_fork_rules (uint8_t version, int64_t early_blocks=0)
 
int get_fee_algorithm ()
 
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)
 
uint64_t get_daemon_blockchain_target_height (std::string &err)
 
uint64_t get_daemon_adjusted_time ()
 
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)
 
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< serializable_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, message_signature_type_t signature_type, cryptonote::subaddress_index index={0, 0}) const
 
message_signature_result_t 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::tuple< uint64_t, uint64_t, std::vector< tools::wallet2::exported_transfer_details > > export_outputs (bool all=false, uint32_t start=0, uint32_t count=0xffffffff) const
 
std::string export_outputs_to_str (bool all=false, uint32_t start=0, uint32_t count=0xffffffff) const
 
size_t import_outputs (const std::tuple< uint64_t, uint64_t, std::vector< tools::wallet2::exported_transfer_details >> &outputs)
 
size_t import_outputs (const std::tuple< uint64_t, uint64_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, bool all=false) const
 
std::pair< uint64_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 (std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &process_txs, bool refreshed=false, bool try_incremental=false)
 
void process_pool_state (const std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &txs)
 
void remove_obsolete_pool_txs (const std::vector< crypto::hash > &tx_hashes, bool remove_if_found)
 
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 ()
 
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)
 
uint64_t get_base_fee (uint32_t priority)
 
uint64_t get_base_fee ()
 
uint64_t get_fee_quantization_mask ()
 
uint64_t get_min_ring_size ()
 
uint64_t get_max_ring_size ()
 
uint64_t adjust_mixin (uint64_t mixin)
 
uint32_t adjust_priority (uint32_t priority)
 
bool is_unattended () const
 
std::pair< size_t, uint64_testimate_tx_size_and_weight (bool use_rct, int n_inputs, int ring_size, int n_outputs, size_t extra_size)
 
bool get_rpc_payment_info (bool mining, bool &payment_required, uint64_t &credits, uint64_t &diff, uint64_t &credits_per_hash_found, cryptonote::blobdata &hashing_blob, uint64_t &height, uint64_t &seed_height, crypto::hash &seed_hash, crypto::hash &next_seed_hash, uint32_t &cookie)
 
bool daemon_requires_payment ()
 
bool make_rpc_payment (uint32_t nonce, uint32_t cookie, uint64_t &credits, uint64_t &balance)
 
bool search_for_rpc_payment (uint64_t credits_target, uint32_t n_threads, const std::function< bool(uint64_t, uint64_t)> &startfunc, const std::function< bool(unsigned)> &contfunc, const std::function< bool(uint64_t)> &foundfunc=NULL, const std::function< void(const std::string &)> &errorfunc=NULL)
 
template<typename T >
void handle_payment_changes (const T &res, std::true_type)
 
template<typename T >
void handle_payment_changes (const T &res, std::false_type)
 
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)
 
bool get_attribute (const std::string &key, std::string &value) 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="POST")
 
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="POST")
 
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="POST", 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 get_rings (const crypto::chacha_key &key, const std::vector< crypto::key_image > &key_images, std::vector< std::vector< uint64_t >> &outs)
 
bool set_ring (const crypto::key_image &key_image, const std::vector< uint64_t > &outs, bool relative)
 
bool set_rings (const std::vector< std::pair< crypto::key_image, std::vector< uint64_t >>> &rings, 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
 
bool frozen (const multisig_tx_set &txs) const
 
bool save_to_file (const std::string &path_to_file, const std::string &binary, bool is_printable=false) const
 
uint64_t get_bytes_sent () const
 
uint64_t get_bytes_received () const
 
void start_background_sync ()
 
void stop_background_sync (const epee::wipeable_string &wallet_password, const crypto::secret_key &spend_secret_key=crypto::null_skey)
 
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)
 
void hash_m_transfer (const transfer_details &transfer, crypto::hash &hash) const
 
uint64_t hash_m_transfers (boost::optional< uint64_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)
 
bool is_offline () const
 
uint64_t credits () const
 
void credit_report (uint64_t &expected_spent, uint64_t &discrepancy) const
 
template<typename T >
T decrypt (const std::string &ciphertext, const crypto::secret_key &skey, bool authenticated) const
 

Static Public Member Functions

static BackgroundSyncType background_sync_type_from_str (const std::string &background_sync_type_str)
 
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)
 
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, crypto::secret_key &spend_key_out)
 
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 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 bool wallet_valid_path_format (const std::string &file_path)
 Check if wallet file path is valid format. More...
 
static std::string make_background_wallet_file_name (const std::string &wallet_file)
 
static std::string make_background_keys_file_name (const std::string &wallet_file)
 
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)
 
static uint64_t estimate_fee (bool use_per_byte_fee, bool use_rct, int n_inputs, int mixin, int n_outputs, size_t extra_size, bool bulletproof, bool clsag, bool bulletproof_plus, bool use_view_tags, uint64_t base_fee, uint64_t fee_quantization_mask)
 
static bool load_from_file (const std::string &path_to_file, std::string &target_str, size_t max_size=1000000000)
 
static std::string get_default_daemon_address ()
 

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 store_keys (const std::string &keys_file_name, const crypto::chacha_key &key, bool watch_only=false, bool background_keys_file=false)
 
boost::optional< wallet2::keys_file_dataget_keys_file_data (const crypto::chacha_key &key, bool watch_only=false, bool background_keys_file=false)
 
bool store_keys_file_data (const std::string &keys_file_name, wallet2::keys_file_data &keys_file_data, bool background_keys_file=false)
 
bool load_keys (const std::string &keys_file_name, const epee::wipeable_string &password)
 Load wallet keys information from wallet file. More...
 
bool load_keys_buf (const std::string &keys_buf, const epee::wipeable_string &password)
 Load wallet keys information from a string buffer. More...
 
bool load_keys_buf (const std::string &keys_buf, const epee::wipeable_string &password, boost::optional< crypto::chacha_key > &keys_to_encrypt)
 
void load_wallet_cache (const bool use_fs, const std::string &cache_buf="")
 
void process_new_transaction (const crypto::hash &txid, const cryptonote::transaction &tx, const std::vector< uint64_t > &o_indices, uint64_t height, uint8_t block_version, 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 ignore_callbacks=false)
 
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)
 
detached_blockchain_data detach_blockchain (uint64_t height, std::map< std::pair< uint64_t, uint64_t >, size_t > *output_tracker_cache=NULL)
 
void handle_reorg (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 clear_user_data ()
 
void pull_blocks (bool first, bool try_incremental, 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, uint64_t &current_height)
 
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 (bool first, bool try_incremental, 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 &last, bool &error, std::exception_ptr &exception)
 
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)
 
bool accept_pool_tx_for_processing (const crypto::hash &txid)
 
void process_unconfirmed_transfer (bool incremental, const crypto::hash &txid, wallet2::unconfirmed_transfer_details &tx_details, bool seen_in_pool, std::chrono::system_clock::time_point now, bool refreshed)
 
void process_pool_info_extent (const cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::response &res, std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &process_txs, bool refreshed)
 
void update_pool_state_by_pool_query (std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &process_txs, bool refreshed=false)
 
void update_pool_state_from_pool_data (bool incremental, const std::vector< crypto::hash > &removed_pool_txids, const std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &added_pool_txs, std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &process_txs, bool refreshed)
 
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 ()
 
std::vector< uint64_tget_unspent_amounts_vector (bool strict)
 
uint64_t get_dynamic_base_fee_estimate ()
 
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)
 
void set_spent (size_t idx, uint64_t height)
 
void set_unspent (size_t idx)
 
bool is_spent (const transfer_details &td, bool strict=true) const
 
bool is_spent (size_t idx, bool strict=true) const
 
void get_outs (std::vector< std::vector< get_outs_entry >> &outs, const std::vector< size_t > &selected_transfers, size_t fake_outputs_count, bool rct, std::unordered_set< crypto::public_key > &valid_public_keys_cache)
 
void get_outs (std::vector< std::vector< get_outs_entry >> &outs, const std::vector< size_t > &selected_transfers, size_t fake_outputs_count, std::vector< uint64_t > &rct_offsets, std::unordered_set< crypto::public_key > &valid_public_keys_cache)
 
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, std::unordered_set< crypto::public_key > &valid_public_keys_cache) 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
 
void get_multisig_k (size_t idx, const std::unordered_set< rct::key > &used_L, rct::key &nonce)
 
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)
 
const crypto::chacha_key get_cache_key ()
 
void verify_password_with_cached_key (const epee::wipeable_string &password)
 
void verify_password_with_cached_key (const crypto::chacha_key &key)
 
size_t get_transfer_details (const crypto::key_image &ki) const
 
tx_entry_data get_tx_entries (const std::unordered_set< crypto::hash > &txids)
 
void sort_scan_tx_entries (std::vector< process_tx_entry_t > &unsorted_tx_entries)
 
void process_scan_txs (const tx_entry_data &txs_to_scan, const tx_entry_data &txs_to_reprocess, const std::unordered_set< crypto::hash > &tx_hashes_to_reprocess, detached_blockchain_data &dbd)
 
void write_background_sync_wallet (const epee::wipeable_string &wallet_password, const epee::wipeable_string &background_cache_password)
 
void process_background_cache_on_open ()
 
void process_background_cache (const background_sync_data_t &background_sync_data, const hashchain &background_chain, uint64_t last_block_reward)
 
void reset_background_sync_data (background_sync_data_t &background_sync_data)
 
void store_background_cache (const crypto::chacha_key &custom_background_key, const bool do_reset_background_sync_data=true)
 
void store_background_keys (const crypto::chacha_key &custom_background_key)
 
bool lock_background_keys_file (const std::string &background_keys_file)
 
bool unlock_background_keys_file ()
 
bool is_background_keys_file_locked () 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 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_stringon_device_pin_request ()
 
boost::optional< epee::wipeable_stringon_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 (bool r, const epee::json_rpc::error &error, const std::string &status, const char *method) const
 
std::string get_client_signature () const
 
void check_rpc_cost (const char *call, uint64_t post_call_credits, uint64_t pre_credits, double expected_cost)
 
bool should_expand (const cryptonote::subaddress_index &index) const
 
bool spends_one_of_ours (const cryptonote::transaction &tx) const
 

Private Attributes

cryptonote::account_base m_account
 
boost::optional< epee::net_utils::http::loginm_daemon_login
 
std::string m_daemon_address
 
std::string m_proxy
 
std::string m_wallet_file
 
std::string m_keys_file
 
std::string m_mms_file
 
const std::unique_ptr< epee::net_utils::http::abstract_http_clientm_http_client
 
hashchain m_blockchain
 
serializable_unordered_map< crypto::hash, unconfirmed_transfer_detailsm_unconfirmed_txs
 
serializable_unordered_map< crypto::hash, confirmed_transfer_detailsm_confirmed_txs
 
serializable_unordered_multimap< crypto::hash, pool_payment_detailsm_unconfirmed_payments
 
serializable_unordered_map< crypto::hash, crypto::secret_keym_tx_keys
 
cryptonote::checkpoints m_checkpoints
 
serializable_unordered_map< crypto::hash, std::vector< crypto::secret_key > > m_additional_tx_keys
 
transfer_container m_transfers
 
payment_container m_payments
 
serializable_unordered_map< crypto::key_image, size_t > m_key_images
 
serializable_unordered_map< crypto::public_key, size_t > m_pub_keys
 
cryptonote::account_public_address m_account_public_address
 
serializable_unordered_map< crypto::public_key, cryptonote::subaddress_indexm_subaddresses
 
std::vector< std::vector< std::string > > m_subaddress_labels
 
serializable_unordered_map< crypto::hash, std::string > m_tx_notes
 
serializable_unordered_map< std::string, std::string > m_attributes
 
std::vector< tools::wallet2::address_book_rowm_address_book
 
std::pair< serializable_map< std::string, std::string >, std::vector< std::string > > m_account_tags
 
uint64_t m_upper_transaction_weight_limit
 
std::vector< std::vector< tools::wallet2::multisig_info > > m_multisig_rescan_info
 
std::vector< std::vector< rct::key > > m_multisig_rescan_k
 
serializable_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
 
uint64_t m_pool_info_query_time
 
std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool > > m_process_pool_txs
 
uint64_t m_skip_to_height
 
bool m_confirm_non_default_ring_size
 
AskPasswordType m_ask_password
 
uint64_t m_max_reorg_depth
 
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
 
uint64_t m_ignore_outputs_above
 
uint64_t m_ignore_outputs_below
 
bool m_track_uses
 
bool m_is_background_wallet
 
BackgroundSyncType m_background_sync_type
 
bool m_show_wallet_name_when_locked
 
uint32_t m_inactivity_lock_timeout
 
BackgroundMiningSetupType m_setup_background_mining
 
bool m_persistent_rpc_client_id
 
float m_auto_mine_for_rpc_payment_threshold
 
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
 
uint32_t m_rpc_version
 
crypto::secret_key m_rpc_client_secret_key
 
rpc_payment_state_t m_rpc_payment_state
 
uint64_t m_credits_target
 
bool m_enable_multisig
 
bool m_allow_mismatched_daemon_version
 
serializable_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
 
serializable_unordered_map< crypto::public_key, serializable_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
 
std::unique_ptr< tools::file_lockerm_background_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< crypto::chacha_key > m_custom_background_key = boost::none
 
std::shared_ptr< wallet_keys_unlockerm_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
 
ExportFormat m_export_format
 
bool m_load_deprecated_formats
 
bool m_has_ever_refreshed_from_node
 
bool m_background_syncing
 
bool m_processing_background_cache
 
background_sync_data_t m_background_sync_data
 

Static Private Attributes

static boost::mutex default_daemon_address_lock
 
static std::string default_daemon_address = ""
 

Friends

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

Member Typedef Documentation

◆ amounts_container

◆ get_outs_entry

◆ payment_container

◆ transfer_container

◆ unique_index_container

Member Enumeration Documentation

◆ AskPasswordType

Enumerator
AskPasswordNever 
AskPasswordOnAction 
AskPasswordToDecrypt 

◆ BackgroundMiningSetupType

Enumerator
BackgroundMiningMaybe 
BackgroundMiningYes 
BackgroundMiningNo 

◆ BackgroundSyncType

Enumerator
BackgroundSyncOff 
BackgroundSyncReusePassword 
BackgroundSyncCustomPassword 

◆ ExportFormat

Enumerator
Binary 
Ascii 

◆ message_signature_type_t

Enumerator
sign_with_spend_key 
sign_with_view_key 

◆ 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,
std::unique_ptr< epee::net_utils::http::http_client_factory http_client_factory = std::unique_ptr<epee::net_utils::http::http_client_factory>(new net::http::client_factory()) 
)

◆ ~wallet2()

tools::wallet2::~wallet2 ( )

Member Function Documentation

◆ accept_pool_tx_for_processing()

bool tools::wallet2::accept_pool_tx_for_processing ( const crypto::hash txid)
private

◆ add_address_book_row()

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

◆ 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)

◆ 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)

◆ adjust_priority()

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

◆ allow_mismatched_daemon_version()

void tools::wallet2::allow_mismatched_daemon_version ( bool  allow_mismatch)
inline

◆ 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_mine_for_rpc_payment_threshold() [1/2]

void tools::wallet2::auto_mine_for_rpc_payment_threshold ( float  threshold)
inline

◆ auto_mine_for_rpc_payment_threshold() [2/2]

float tools::wallet2::auto_mine_for_rpc_payment_threshold ( ) const
inline

◆ auto_refresh() [1/2]

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

◆ auto_refresh() [2/2]

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

◆ background_sync_type()

BackgroundSyncType tools::wallet2::background_sync_type ( ) const
inline

◆ background_sync_type_from_str()

static BackgroundSyncType tools::wallet2::background_sync_type_from_str ( const std::string &  background_sync_type_str)
inlinestatic

◆ balance()

uint64_t tools::wallet2::balance ( uint32_t  subaddr_index_major,
bool  strict 
) const

◆ balance_all()

uint64_t tools::wallet2::balance_all ( bool  strict) const

◆ balance_per_subaddress()

std::map< uint32_t, uint64_t > tools::wallet2::balance_per_subaddress ( uint32_t  subaddr_index_major,
bool  strict 
) 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,
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,
const is_out_data is_out_data,
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,
bool wallet_is_outdated = NULL,
bool daemon_is_outdated = NULL 
)

◆ check_genesis()

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

◆ check_hard_fork_version()

bool tools::wallet2::check_hard_fork_version ( cryptonote::network_type  nettype,
const std::vector< std::pair< uint8_t, uint64_t >> &  daemon_hard_forks,
const uint64_t  height,
const uint64_t  target_height,
bool wallet_is_outdated,
bool daemon_is_outdated 
)

◆ 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_rpc_cost()

void tools::wallet2::check_rpc_cost ( const char *  call,
uint64_t  post_call_credits,
uint64_t  pre_credits,
double  expected_cost 
)
private

◆ 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

◆ check_version()

bool tools::wallet2::check_version ( uint32_t version,
bool wallet_is_outdated,
bool daemon_is_outdated 
)

◆ clear()

bool tools::wallet2::clear ( void  )
private

◆ clear_soft()

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

◆ clear_user_data()

void tools::wallet2::clear_user_data ( )
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_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_one_off_subaddress()

void tools::wallet2::create_one_off_subaddress ( const cryptonote::subaddress_index index)

◆ 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,
uint32_t  priority,
const std::vector< uint8_t > &  extra,
uint32_t  subaddr_account,
std::set< uint32_t subaddr_indices,
const unique_index_container subtract_fee_from_outputs = {} 
)

◆ 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,
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,
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,
uint32_t  priority,
const std::vector< uint8_t > &  extra 
)

◆ create_unmixable_sweep_transactions()

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

◆ credit_report()

void tools::wallet2::credit_report ( uint64_t expected_spent,
uint64_t discrepancy 
) const
inline

◆ credits()

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

◆ credits_target() [1/2]

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

◆ credits_target() [2/2]

void tools::wallet2::credits_target ( uint64_t  threshold)
inline

◆ daemon_requires_payment()

bool tools::wallet2::daemon_requires_payment ( )

◆ decrypt() [1/2]

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

◆ decrypt() [2/2]

template<typename T >
T tools::wallet2::decrypt ( const std::string &  ciphertext,
const crypto::secret_key skey,
bool  authenticated 
) 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()

wallet2::detached_blockchain_data 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

◆ device_show_address()

void tools::wallet2::device_show_address ( uint32_t  account_index,
uint32_t  address_index,
const boost::optional< crypto::hash8 > &  payment_id 
)

◆ 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

◆ enable_multisig()

void tools::wallet2::enable_multisig ( 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 std::string &  plaintext,
const crypto::secret_key skey,
bool  authenticated = true 
) const

◆ encrypt() [4/4]

std::string tools::wallet2::encrypt ( const epee::wipeable_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 ( )

◆ estimate_fee()

uint64_t tools::wallet2::estimate_fee ( bool  use_per_byte_fee,
bool  use_rct,
int  n_inputs,
int  mixin,
int  n_outputs,
size_t  extra_size,
bool  bulletproof,
bool  clsag,
bool  bulletproof_plus,
bool  use_view_tags,
uint64_t  base_fee,
uint64_t  fee_quantization_mask 
)
static

◆ estimate_tx_size_and_weight()

std::pair< size_t, uint64_t > tools::wallet2::estimate_tx_size_and_weight ( bool  use_rct,
int  n_inputs,
int  ring_size,
int  n_outputs,
size_t  extra_size 
)

◆ exchange_multisig_keys()

std::string tools::wallet2::exchange_multisig_keys ( const epee::wipeable_string password,
const std::vector< std::string > &  kex_messages,
const bool  force_update_use_with_caution = false 
)

Increment the multisig key exchange round.

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

◆ expand_subaddresses()

void tools::wallet2::expand_subaddresses ( const cryptonote::subaddress_index index)

brief: expand subaddress labels up to index, and scanning map to highest labeled index plus current lookahead param: index -

All calls to expand_subaddresses() will always expand the subaddress map if the lookahead values have been increased since the last call.

◆ explicit_refresh_from_block_height() [1/2]

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

◆ explicit_refresh_from_block_height() [2/2]

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

◆ export_blockchain()

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

◆ export_format()

const ExportFormat& tools::wallet2::export_format ( ) const
inline

◆ export_key_images() [1/2]

bool tools::wallet2::export_key_images ( const std::string &  filename,
bool  all = false 
) const

◆ export_key_images() [2/2]

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

◆ export_multisig()

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

Export multisig info This will generate and remember new k values

◆ export_outputs()

std::tuple< uint64_t, uint64_t, std::vector< tools::wallet2::exported_transfer_details > > tools::wallet2::export_outputs ( bool  all = false,
uint32_t  start = 0,
uint32_t  count = 0xffffffff 
) const

◆ export_outputs_to_str()

std::string tools::wallet2::export_outputs_to_str ( bool  all = false,
uint32_t  start = 0,
uint32_t  count = 0xffffffff 
) 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

◆ 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 ( size_t  idx)

◆ freeze() [2/2]

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

◆ frozen() [1/4]

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

◆ frozen() [2/4]

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

◆ frozen() [3/4]

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

◆ frozen() [4/4]

bool tools::wallet2::frozen ( const multisig_tx_set txs) const

◆ generate() [1/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. Assumes the multisig setup has already completed for the provided multisig info.

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() [2/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() [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 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() [4/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_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< serializable_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()

bool tools::wallet2::get_attribute ( const std::string &  key,
std::string &  value 
) const

◆ get_base_fee() [1/2]

uint64_t tools::wallet2::get_base_fee ( uint32_t  priority)

◆ get_base_fee() [2/2]

uint64_t tools::wallet2::get_base_fee ( )

◆ 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_cache_file_data()

boost::optional< wallet2::cache_file_data > tools::wallet2::get_cache_file_data ( )

get_cache_file_data Get wallet cache data which can be stored to a wallet file.

Returns
Encrypted wallet cache data which can be stored to a wallet file (using current password)

◆ get_cache_key()

const crypto::chacha_key tools::wallet2::get_cache_key ( )
private

◆ get_client_signature()

std::string tools::wallet2::get_client_signature ( ) const
private

◆ get_confirm_backlog_threshold()

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

◆ get_current_hard_fork()

uint8_t tools::wallet2::get_current_hard_fork ( )

◆ get_daemon_address()

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

◆ get_daemon_adjusted_time()

uint64_t tools::wallet2::get_daemon_adjusted_time ( )

◆ get_daemon_blockchain_height()

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

◆ 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_daemon_address()

static std::string tools::wallet2::get_default_daemon_address ( )
inlinestatic

◆ 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 ( )
private

◆ get_fee_algorithm()

int tools::wallet2::get_fee_algorithm ( )

◆ get_fee_multiplier()

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

◆ get_fee_quantization_mask()

uint64_t tools::wallet2::get_fee_quantization_mask ( )

◆ get_hard_fork_info()

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

◆ 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_keys_file_data() [1/2]

boost::optional< wallet2::keys_file_data > tools::wallet2::get_keys_file_data ( const epee::wipeable_string password,
bool  watch_only 
)

get_keys_file_data Get wallet keys data which can be stored to a wallet file.

Parameters
passwordPassword that currently locks the wallet
watch_onlytrue to include only view key, false to include both spend and view keys
Returns
Encrypted wallet keys data which can be stored to a wallet file
Exceptions
error::invalid_passwordif password does not match current wallet

◆ get_keys_file_data() [2/2]

boost::optional< wallet2::keys_file_data > tools::wallet2::get_keys_file_data ( const crypto::chacha_key &  key,
bool  watch_only = false,
bool  background_keys_file = false 
)
private

◆ 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 ( )

◆ 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 ( )

◆ 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_first_kex_msg()

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

Get initial message to start multisig key exchange (before 'make_multisig()' is called)

Returns
string to send to other participants

◆ get_multisig_k()

void tools::wallet2::get_multisig_k ( size_t  idx,
const std::unordered_set< rct::key > &  used_L,
rct::key nonce 
)
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() 
) const

◆ get_multisig_signer_public_key()

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

◆ get_multisig_signing_public_key() [1/2]

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

◆ get_multisig_signing_public_key() [2/2]

crypto::public_key tools::wallet2::get_multisig_signing_public_key ( const crypto::secret_key skey) 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() [1/2]

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,
bool  rct,
std::unordered_set< crypto::public_key > &  valid_public_keys_cache 
)
private

◆ get_outs() [2/2]

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,
std::vector< uint64_t > &  rct_offsets,
std::unordered_set< crypto::public_key > &  valid_public_keys_cache 
)
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_public_nodes()

std::vector< cryptonote::public_node > tools::wallet2::get_public_nodes ( bool  white_only = true)

◆ 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::key_image key_image,
std::vector< uint64_t > &  outs 
)

◆ get_ring() [2/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_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() [1/2]

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

◆ get_rings() [2/2]

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

◆ get_rpc_client_secret_key()

crypto::secret_key tools::wallet2::get_rpc_client_secret_key ( ) const
inline

◆ get_rpc_payment_info()

bool tools::wallet2::get_rpc_payment_info ( bool  mining,
bool payment_required,
uint64_t credits,
uint64_t diff,
uint64_t credits_per_hash_found,
cryptonote::blobdata hashing_blob,
uint64_t height,
uint64_t seed_height,
crypto::hash seed_hash,
crypto::hash next_seed_hash,
uint32_t cookie 
)

◆ 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]

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

◆ get_transfer_details() [2/2]

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

◆ 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_entries()

wallet2::tx_entry_data tools::wallet2::get_tx_entries ( const std::unordered_set< crypto::hash > &  txids)
private

◆ 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 ( bool  strict)
private

◆ get_upper_transaction_weight_limit()

uint64_t tools::wallet2::get_upper_transaction_weight_limit ( )
private

◆ get_wallet_file()

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

◆ handle_payment_changes() [1/2]

template<typename T >
void tools::wallet2::handle_payment_changes ( const T res,
std::true_type   
)
inline

◆ handle_payment_changes() [2/2]

template<typename T >
void tools::wallet2::handle_payment_changes ( const T res,
std::false_type   
)
inline

◆ handle_reorg()

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

◆ has_multisig_partial_key_images()

bool tools::wallet2::has_multisig_partial_key_images ( ) const

◆ has_proxy_option()

bool tools::wallet2::has_proxy_option ( ) const

has_proxy_option Check the global proxy (–proxy) has been defined or not.

Returns
returns bool representing the global proxy (–proxy).

◆ 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 ( boost::optional< uint64_t transfer_height,
crypto::hash hash 
) const

◆ if() [1/2]

tools::wallet2::if ( )
inline

◆ if() [2/2]

tools::wallet2::if ( )
inline

◆ 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

◆ ignore_outputs_above() [1/2]

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

◆ ignore_outputs_above() [2/2]

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

◆ ignore_outputs_below() [1/2]

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

◆ ignore_outputs_below() [2/2]

void tools::wallet2::ignore_outputs_below ( uint64_t  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::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() [2/4]

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

◆ import_key_images() [3/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_key_images() [4/4]

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

◆ 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() [1/2]

size_t tools::wallet2::import_outputs ( const std::tuple< uint64_t, uint64_t, std::vector< tools::wallet2::exported_transfer_details >> &  outputs)

◆ import_outputs() [2/2]

size_t tools::wallet2::import_outputs ( const std::tuple< uint64_t, uint64_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)

◆ inactivity_lock_timeout() [1/2]

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

◆ inactivity_lock_timeout() [2/2]

void tools::wallet2::inactivity_lock_timeout ( uint32_t  seconds)
inline

◆ init()

bool tools::wallet2::init ( std::string  daemon_address = "http://localhost:8080",
boost::optional< epee::net_utils::http::login daemon_login = boost::none,
const std::string &  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 
)

◆ 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 = "POST" 
)
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 = "POST" 
)
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 = "POST",
const std::string &  req_id = "0" 
)
inline

◆ is_background_keys_file_locked()

bool tools::wallet2::is_background_keys_file_locked ( ) const
private

◆ is_background_syncing()

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

◆ is_background_wallet()

bool tools::wallet2::is_background_wallet ( ) const
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_mismatched_daemon_version_allowed()

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

◆ is_multisig_enabled()

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

◆ is_offline()

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

◆ is_out_to_acc()

bool tools::wallet2::is_out_to_acc ( const cryptonote::account_public_address address,
const crypto::public_key out_key,
const crypto::key_derivation derivation,
const std::vector< crypto::key_derivation > &  additional_derivations,
const size_t  output_index,
const boost::optional< crypto::view_tag > &  view_tag_opt,
crypto::key_derivation found_derivation 
) const

◆ is_output_blackballed()

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

◆ is_spent() [1/2]

bool tools::wallet2::is_spent ( const transfer_details td,
bool  strict = true 
) const
private

◆ is_spent() [2/2]

bool tools::wallet2::is_spent ( size_t  idx,
bool  strict = true 
) const
private

◆ is_synced()

bool tools::wallet2::is_synced ( )

◆ is_transfer_unlocked() [1/2]

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

◆ is_transfer_unlocked() [2/2]

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

◆ 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 
)

◆ 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,
const std::string &  keys_buf = "",
const std::string &  cache_buf = "" 
)

◆ load_deprecated_formats() [1/2]

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

◆ load_deprecated_formats() [2/2]

void tools::wallet2::load_deprecated_formats ( bool  load)
inline

◆ load_from_file()

bool tools::wallet2::load_from_file ( const std::string &  path_to_file,
std::string &  target_str,
size_t  max_size = 1000000000 
)
static

◆ load_keys()

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

Load wallet keys information from wallet file.

Load wallet information from wallet file.

Parameters
keys_file_nameName of wallet file
passwordPassword of wallet file

◆ load_keys_buf() [1/2]

bool tools::wallet2::load_keys_buf ( const std::string &  keys_buf,
const epee::wipeable_string password 
)
private

Load wallet keys information from a string buffer.

Parameters
keys_bufKeys buffer to load
passwordPassword of keys buffer

◆ load_keys_buf() [2/2]

bool tools::wallet2::load_keys_buf ( const std::string &  keys_buf,
const epee::wipeable_string password,
boost::optional< crypto::chacha_key > &  keys_to_encrypt 
)
private

◆ 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

◆ load_wallet_cache()

void tools::wallet2::load_wallet_cache ( const bool  use_fs,
const std::string &  cache_buf = "" 
)
private

◆ lock_background_keys_file()

bool tools::wallet2::lock_background_keys_file ( const std::string &  background_keys_file)
private

◆ lock_keys_file()

bool tools::wallet2::lock_keys_file ( )

◆ lookup_device()

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

◆ make_background_keys_file_name()

std::string tools::wallet2::make_background_keys_file_name ( const std::string &  wallet_file)
static

◆ make_background_wallet_file_name()

std::string tools::wallet2::make_background_wallet_file_name ( const std::string &  wallet_file)
static

◆ 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()

std::string tools::wallet2::make_multisig ( const epee::wipeable_string password,
const std::vector< std::string > &  kex_messages,
const std::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_rpc_payment()

bool tools::wallet2::make_rpc_payment ( uint32_t  nonce,
uint32_t  cookie,
uint64_t credits,
uint64_t balance 
)

◆ 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

◆ max_reorg_depth() [1/2]

void tools::wallet2::max_reorg_depth ( uint64_t  depth)
inline

◆ max_reorg_depth() [2/2]

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

◆ merge_destinations() [1/2]

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

◆ merge_destinations() [2/2]

bool tools::wallet2::merge_destinations ( ) const
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

◆ persistent_rpc_client_id() [1/2]

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

◆ persistent_rpc_client_id() [2/2]

void tools::wallet2::persistent_rpc_client_id ( bool  persistent)
inline

◆ 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 
)
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_background_cache()

void tools::wallet2::process_background_cache ( const background_sync_data_t background_sync_data,
const hashchain background_chain,
uint64_t  last_block_reward 
)
private

◆ process_background_cache_on_open()

void tools::wallet2::process_background_cache_on_open ( )
private

◆ 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,
uint8_t  block_version,
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  ignore_callbacks = false 
)
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_pool_info_extent()

void tools::wallet2::process_pool_info_extent ( const cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::response res,
std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &  process_txs,
bool  refreshed 
)
private

◆ process_pool_state()

void tools::wallet2::process_pool_state ( const std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &  txs)

◆ process_scan_txs()

void tools::wallet2::process_scan_txs ( const tx_entry_data txs_to_scan,
const tx_entry_data txs_to_reprocess,
const std::unordered_set< crypto::hash > &  tx_hashes_to_reprocess,
detached_blockchain_data dbd 
)
private

◆ process_unconfirmed()

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

◆ process_unconfirmed_transfer()

void tools::wallet2::process_unconfirmed_transfer ( bool  incremental,
const crypto::hash txid,
wallet2::unconfirmed_transfer_details tx_details,
bool  seen_in_pool,
std::chrono::system_clock::time_point  now,
bool  refreshed 
)
private

◆ pull_and_parse_next_blocks()

void tools::wallet2::pull_and_parse_next_blocks ( bool  first,
bool  try_incremental,
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 last,
bool error,
std::exception_ptr &  exception 
)
private

◆ pull_blocks()

void tools::wallet2::pull_blocks ( bool  first,
bool  try_incremental,
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,
uint64_t current_height 
)
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]

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

◆ refresh() [3/4]

void tools::wallet2::refresh ( bool  trusted_daemon,
uint64_t  start_height,
uint64_t blocks_fetched,
bool received_money,
bool  check_pool = true,
bool  try_incremental = true,
uint64_t  max_blocks = std::numeric_limits<uint64_t>::max() 
)

◆ refresh() [4/4]

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

◆ 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,
bool  remove_if_found 
)

◆ 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 ( )

◆ reset_background_sync_data()

void tools::wallet2::reset_background_sync_data ( background_sync_data_t background_sync_data)
private

◆ 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,
const std::vector< cryptonote::tx_destination_entry > &  dsts,
const unique_index_container subtract_fee_from_outputs = {} 
) const

◆ save_multisig_tx() [1/4]

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

◆ save_multisig_tx() [2/4]

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

◆ save_multisig_tx() [3/4]

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

◆ save_multisig_tx() [4/4]

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

◆ save_to_file()

bool tools::wallet2::save_to_file ( const std::string &  path_to_file,
const std::string &  binary,
bool  is_printable = false 
) const

◆ 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

◆ scan_tx()

void tools::wallet2::scan_tx ( const std::unordered_set< crypto::hash > &  txids)

◆ search_for_rpc_payment()

bool tools::wallet2::search_for_rpc_payment ( uint64_t  credits_target,
uint32_t  n_threads,
const std::function< bool(uint64_t, uint64_t)> &  startfunc,
const std::function< bool(unsigned)> &  contfunc,
const std::function< bool(uint64_t)> &  foundfunc = NULL,
const std::function< void(const std::string &)> &  errorfunc = NULL 
)

◆ 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)

◆ 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_address_book_row()

bool tools::wallet2::set_address_book_row ( size_t  row_id,
const cryptonote::account_public_address address,
const crypto::hash8 payment_id,
const std::string &  description,
bool  is_subaddress 
)

◆ 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,
const std::string &  proxy = "" 
)

◆ 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_export_format()

void tools::wallet2::set_export_format ( const ExportFormat export_format)
inline

◆ 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_proxy()

bool tools::wallet2::set_proxy ( const std::string &  address)

◆ 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_rings()

bool tools::wallet2::set_rings ( const std::vector< std::pair< crypto::key_image, std::vector< uint64_t >>> &  rings,
bool  relative 
)

◆ set_rpc_client_secret_key()

void tools::wallet2::set_rpc_client_secret_key ( const crypto::secret_key key)
inline

◆ 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,
const boost::optional< cryptonote::account_public_address > &  single_destination_subaddress = boost::none 
)

◆ 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_background_sync()

void tools::wallet2::setup_background_sync ( BackgroundSyncType  background_sync_type,
const epee::wipeable_string wallet_password,
const boost::optional< epee::wipeable_string > &  background_cache_password 
)

◆ setup_keys()

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

◆ setup_new_blockchain()

void tools::wallet2::setup_new_blockchain ( )
private

◆ should_expand()

bool tools::wallet2::should_expand ( const cryptonote::subaddress_index index) const
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

◆ show_wallet_name_when_locked() [1/2]

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

◆ show_wallet_name_when_locked() [2/2]

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

◆ sign()

std::string tools::wallet2::sign ( const std::string &  data,
message_signature_type_t  signature_type,
cryptonote::subaddress_index  index = {0, 0} 
) 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 
)

◆ sort_scan_tx_entries()

void tools::wallet2::sort_scan_tx_entries ( std::vector< process_tx_entry_t > &  unsorted_tx_entries)
private

◆ spends_one_of_ours()

bool tools::wallet2::spends_one_of_ours ( const cryptonote::transaction tx) const
private

◆ start_background_sync()

void tools::wallet2::start_background_sync ( )

◆ stop()

void tools::wallet2::stop ( )
inline

◆ stop_background_sync()

void tools::wallet2::stop_background_sync ( const epee::wipeable_string wallet_password,
const crypto::secret_key spend_secret_key = crypto::null_skey 
)

◆ store()

void tools::wallet2::store ( )

◆ store_background_cache()

void tools::wallet2::store_background_cache ( const crypto::chacha_key &  custom_background_key,
const bool  do_reset_background_sync_data = true 
)
private

◆ store_background_keys()

void tools::wallet2::store_background_keys ( const crypto::chacha_key &  custom_background_key)
private

◆ store_keys() [1/2]

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_keys() [2/2]

bool tools::wallet2::store_keys ( const std::string &  keys_file_name,
const crypto::chacha_key &  key,
bool  watch_only = false,
bool  background_keys_file = false 
)
private

◆ store_keys_file_data()

bool tools::wallet2::store_keys_file_data ( const std::string &  keys_file_name,
wallet2::keys_file_data keys_file_data,
bool  background_keys_file = false 
)
private

◆ store_to()

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

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 that currently locks the wallet
force_rewrite_keysif true, always rewrite keys file

Leave both "path" and "password" blank to restore the cache file to the current position in the disk (which is the same as calling store()). If you want to store the wallet with a new password, use the method change_password().

Normally the keys file is not overwritten when storing, except when force_rewrite_keys is true or when path is a new wallet file.

Exceptions
error::invalid_passwordIf storing keys file and old password is incorrect

◆ 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 ( size_t  idx)

◆ thaw() [2/2]

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

◆ throw_on_rpc_response_error()

void tools::wallet2::throw_on_rpc_response_error ( bool  r,
const epee::json_rpc::error error,
const 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()

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,
std::unordered_set< crypto::public_key > &  valid_public_keys_cache,
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,
const bool  use_view_tags 
)

◆ 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,
std::unordered_set< crypto::public_key > &  valid_public_keys_cache,
uint64_t  fee,
const std::vector< uint8_t > &  extra,
cryptonote::transaction tx,
pending_tx ptx,
const rct::RCTConfig rct_config,
const bool  use_view_tags 
)

◆ 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,
std::unordered_set< crypto::public_key > &  valid_public_keys_cache 
) const
private

◆ unblackball_output()

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

◆ unlock_background_keys_file()

bool tools::wallet2::unlock_background_keys_file ( )
private

◆ unlock_keys_file()

bool tools::wallet2::unlock_keys_file ( )

◆ unlocked_balance()

uint64_t tools::wallet2::unlocked_balance ( uint32_t  subaddr_index_major,
bool  strict,
uint64_t blocks_to_unlock = NULL,
uint64_t time_to_unlock = NULL 
)

◆ unlocked_balance_all()

uint64_t tools::wallet2::unlocked_balance_all ( bool  strict,
uint64_t blocks_to_unlock = NULL,
uint64_t time_to_unlock = NULL 
)

◆ unlocked_balance_per_subaddress()

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

◆ unset_ring() [1/2]

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

◆ unset_ring() [2/2]

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

◆ 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 ( std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &  process_txs,
bool  refreshed = false,
bool  try_incremental = false 
)

◆ update_pool_state_by_pool_query()

void tools::wallet2::update_pool_state_by_pool_query ( std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &  process_txs,
bool  refreshed = false 
)
private

◆ update_pool_state_from_pool_data()

void tools::wallet2::update_pool_state_from_pool_data ( bool  incremental,
const std::vector< crypto::hash > &  removed_pool_txids,
const std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &  added_pool_txs,
std::vector< std::tuple< cryptonote::transaction, crypto::hash, bool >> &  process_txs,
bool  refreshed 
)
private

◆ use_fork_rules()

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

◆ verify()

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

◆ verify_password() [1/4]

static 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 
)
inlinestatic

◆ verify_password() [2/4]

static 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,
crypto::secret_key spend_key_out 
)
static

◆ verify_password() [3/4]

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

verifies given password is correct for default wallet keys file

◆ verify_password() [4/4]

bool tools::wallet2::verify_password ( const epee::wipeable_string password,
crypto::secret_key spend_key_out 
)

◆ verify_password_with_cached_key() [1/2]

void tools::wallet2::verify_password_with_cached_key ( const epee::wipeable_string password)
private

◆ verify_password_with_cached_key() [2/2]

void tools::wallet2::verify_password_with_cached_key ( const crypto::chacha_key &  key)
private

◆ 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

Check if wallet file path is valid format.

Parameters
file_pathWallet file path
Returns
Whether path is valid format

◆ watch_only()

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

◆ write_background_sync_wallet()

void tools::wallet2::write_background_sync_wallet ( const epee::wipeable_string wallet_password,
const epee::wipeable_string background_cache_password 
)
private

◆ 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"

◆ default_daemon_address

std::string tools::wallet2::default_daemon_address = ""
staticprivate

◆ default_daemon_address_lock

boost::mutex tools::wallet2::default_daemon_address_lock
staticprivate

◆ 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_public_address

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

◆ m_account_tags

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

◆ m_additional_tx_keys

serializable_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_allow_mismatched_daemon_version

bool tools::wallet2::m_allow_mismatched_daemon_version
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

serializable_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_mine_for_rpc_payment_threshold

float tools::wallet2::m_auto_mine_for_rpc_payment_threshold
private

◆ m_auto_refresh

bool tools::wallet2::m_auto_refresh
private

◆ m_background_keys_file_locker

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

◆ m_background_sync_data

background_sync_data_t tools::wallet2::m_background_sync_data
private

◆ m_background_sync_type

BackgroundSyncType tools::wallet2::m_background_sync_type
private

◆ m_background_syncing

bool tools::wallet2::m_background_syncing
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

serializable_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_non_default_ring_size

bool tools::wallet2::m_confirm_non_default_ring_size
private

◆ m_confirmed_txs

serializable_unordered_map<crypto::hash, confirmed_transfer_details> tools::wallet2::m_confirmed_txs
private

◆ m_credits_target

uint64_t tools::wallet2::m_credits_target
private

◆ m_custom_background_key

boost::optional<crypto::chacha_key> tools::wallet2::m_custom_background_key = boost::none
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_enable_multisig

bool tools::wallet2::m_enable_multisig
private

◆ m_encrypt_keys_after_refresh

std::shared_ptr<wallet_keys_unlocker> 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_export_format

ExportFormat tools::wallet2::m_export_format
private

◆ m_first_refresh_done

bool tools::wallet2::m_first_refresh_done
private

◆ m_has_ever_refreshed_from_node

bool tools::wallet2::m_has_ever_refreshed_from_node
private

◆ m_http_client

const std::unique_ptr<epee::net_utils::http::abstract_http_client> tools::wallet2::m_http_client
private

◆ m_ignore_fractional_outputs

bool tools::wallet2::m_ignore_fractional_outputs
private

◆ m_ignore_outputs_above

uint64_t tools::wallet2::m_ignore_outputs_above
private

◆ m_ignore_outputs_below

uint64_t tools::wallet2::m_ignore_outputs_below
private

◆ m_inactivity_lock_timeout

uint32_t tools::wallet2::m_inactivity_lock_timeout
private

◆ m_is_background_wallet

bool tools::wallet2::m_is_background_wallet
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

◆ m_key_images

serializable_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_load_deprecated_formats

bool tools::wallet2::m_load_deprecated_formats
private

◆ m_max_reorg_depth

uint64_t tools::wallet2::m_max_reorg_depth
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

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

◆ m_multisig_rescan_k

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_persistent_rpc_client_id

bool tools::wallet2::m_persistent_rpc_client_id
private

◆ m_pool_info_query_time

uint64_t tools::wallet2::m_pool_info_query_time
private

◆ m_print_ring_members

bool tools::wallet2::m_print_ring_members
private

◆ m_process_pool_txs

std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool> > tools::wallet2::m_process_pool_txs
private

◆ m_processing_background_cache

bool tools::wallet2::m_processing_background_cache
private

◆ m_proxy

std::string tools::wallet2::m_proxy
private

◆ m_pub_keys

serializable_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_rpc_client_secret_key

crypto::secret_key tools::wallet2::m_rpc_client_secret_key
private

◆ m_rpc_payment_state

rpc_payment_state_t tools::wallet2::m_rpc_payment_state
private

◆ m_rpc_version

uint32_t tools::wallet2::m_rpc_version
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_show_wallet_name_when_locked

bool tools::wallet2::m_show_wallet_name_when_locked
private

◆ m_skip_to_height

uint64_t tools::wallet2::m_skip_to_height
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

◆ 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

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

◆ m_tx_keys

serializable_unordered_map<crypto::hash, crypto::secret_key> tools::wallet2::m_tx_keys
private

◆ m_tx_notes

serializable_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

serializable_unordered_multimap<crypto::hash, pool_payment_details> tools::wallet2::m_unconfirmed_payments
private

◆ m_unconfirmed_txs

serializable_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)
static

◆ 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: