|
Electroneum
|
#include <wallet2.h>

Classes | |
| struct | address_book_row |
| struct | cache_file_data |
| struct | confirmed_transfer_details |
| struct | keys_file_data |
| struct | payment_details |
| struct | pending_tx |
| struct | signed_tx_set |
| struct | transfer_details |
| struct | tx_construction_data |
| struct | unconfirmed_transfer_details |
| struct | unsigned_tx_set |
Public Types | |
| enum | RefreshType { RefreshFull, RefreshOptimizeCoinbase, RefreshNoCoinbase, RefreshDefault = RefreshOptimizeCoinbase } |
| typedef std::vector< transfer_details > | transfer_container |
| typedef std::unordered_multimap< crypto::hash, payment_details > | payment_container |
| typedef std::tuple< uint64_t, crypto::public_key, rct::key > | get_outs_entry |
Public Member Functions | |
| wallet2 (bool testnet=false, bool restricted=false) | |
| crypto::secret_key | generate (const std::string &wallet, const std::string &password, const crypto::secret_key &recovery_param=crypto::secret_key(), bool recover=false, bool two_random=false) |
| Generates a wallet or restores one. More... | |
| void | generate (const std::string &wallet, const std::string &password, const cryptonote::account_public_address &account_public_address, const crypto::secret_key &spendkey, const crypto::secret_key &viewkey) |
| Creates a wallet from a public address and a spend/view secret key pair. More... | |
| void | generate (const std::string &wallet, const std::string &password, const cryptonote::account_public_address &account_public_address, const crypto::secret_key &viewkey=crypto::secret_key()) |
| Creates a watch only wallet from a public address and a view secret key. More... | |
| void | rewrite (const std::string &wallet_name, const std::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 std::string &password) |
| 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 std::string &password) |
| void | store () |
| void | store_to (const std::string &path, const std::string &password) |
| store_to - stores wallet to another file(s), deleting old ones More... | |
| std::string | path () const |
| bool | verify_password (const std::string &password) const |
| verifies given password is correct for default wallet keys file More... | |
| cryptonote::account_base & | get_account () |
| const cryptonote::account_base & | get_account () const |
| void | set_refresh_from_block_height (uint64_t height) |
| uint64_t | get_refresh_from_block_height () const |
| bool | deinit () |
| bool | init (std::string daemon_address="http://localhost:8080", boost::optional< epee::net_utils::http::login > daemon_login=boost::none, std::string blockchain_db_path="", uint64_t upper_transaction_size_limit=0) |
| void | stop () |
| i_wallet2_callback * | callback () const |
| void | callback (i_wallet2_callback *callback) |
| bool | is_deterministic () const |
| Checks if deterministic wallet. More... | |
| bool | get_seed (std::string &electrum_words) 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... | |
| bool | is_deprecated () const |
| Tells if the wallet file is deprecated. More... | |
| void | refresh () |
| void | refresh (uint64_t start_height, uint64_t &blocks_fetched) |
| void | refresh (uint64_t start_height, uint64_t &blocks_fetched, bool &received_money) |
| bool | refresh (uint64_t &blocks_fetched, bool &received_money, bool &ok) |
| void | set_refresh_type (RefreshType refresh_type) |
| RefreshType | get_refresh_type () const |
| bool | testnet () const |
| bool | restricted () const |
| bool | watch_only () const |
| uint64_t | balance () const |
| uint64_t | unlocked_balance () const |
| uint64_t | unlocked_dust_balance (const tx_dust_policy &dust_policy) const |
| template<typename T > | |
| void | transfer (const std::vector< cryptonote::tx_destination_entry > &dsts, const size_t fake_outputs_count, const std::vector< size_t > &unused_transfers_indices, uint64_t unlock_time, uint64_t fee, const std::vector< uint8_t > &extra, T destination_split_strategy, const tx_dust_policy &dust_policy, bool trusted_daemon) |
| template<typename T > | |
| void | transfer (const std::vector< cryptonote::tx_destination_entry > &dsts, const size_t fake_outputs_count, const std::vector< size_t > &unused_transfers_indices, uint64_t unlock_time, uint64_t fee, const std::vector< uint8_t > &extra, T destination_split_strategy, const tx_dust_policy &dust_policy, cryptonote::transaction &tx, pending_tx &ptx, bool trusted_daemon) |
| void | transfer (const std::vector< cryptonote::tx_destination_entry > &dsts, const size_t fake_outputs_count, const std::vector< size_t > &unused_transfers_indices, uint64_t unlock_time, uint64_t fee, const std::vector< uint8_t > &extra, bool trusted_daemon) |
| void | transfer (const std::vector< cryptonote::tx_destination_entry > &dsts, const size_t fake_outputs_count, const std::vector< size_t > &unused_transfers_indices, uint64_t unlock_time, uint64_t fee, const std::vector< uint8_t > &extra, cryptonote::transaction &tx, pending_tx &ptx, bool trusted_daemon) |
| template<typename T > | |
| void | transfer_selected (const std::vector< cryptonote::tx_destination_entry > &dsts, const std::list< size_t > selected_transfers, size_t fake_outputs_count, std::vector< std::vector< tools::wallet2::get_outs_entry >> &outs, uint64_t unlock_time, uint64_t fee, const std::vector< uint8_t > &extra, T destination_split_strategy, const tx_dust_policy &dust_policy, cryptonote::transaction &tx, pending_tx &ptx) |
| void | transfer_selected_rct (std::vector< cryptonote::tx_destination_entry > dsts, const std::list< size_t > selected_transfers, size_t fake_outputs_count, std::vector< std::vector< tools::wallet2::get_outs_entry >> &outs, uint64_t unlock_time, uint64_t fee, const std::vector< uint8_t > &extra, cryptonote::transaction &tx, pending_tx &ptx) |
| 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) |
| 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 | sign_tx (unsigned_tx_set &exported_txs, const std::string &signed_filename, std::vector< wallet2::pending_tx > &ptx) |
| bool | load_unsigned_tx (const std::string &unsigned_filename, unsigned_tx_set &exported_txs) |
| 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) |
| std::vector< pending_tx > | create_transactions (std::vector< cryptonote::tx_destination_entry > dsts, const size_t fake_outs_count, const uint64_t unlock_time, uint32_t priority, const std::vector< uint8_t > extra, bool trusted_daemon) |
| std::vector< wallet2::pending_tx > | create_transactions_2 (std::vector< cryptonote::tx_destination_entry > dsts, const size_t fake_outs_count, const uint64_t unlock_time, uint32_t priority, const std::vector< uint8_t > extra, bool trusted_daemon) |
| std::vector< wallet2::pending_tx > | create_transactions_all (uint64_t below, const cryptonote::account_public_address &address, const size_t fake_outs_count, const uint64_t unlock_time, uint32_t priority, const std::vector< uint8_t > extra, bool trusted_daemon) |
| std::vector< wallet2::pending_tx > | create_transactions_from (const cryptonote::account_public_address &address, std::vector< size_t > unused_transfers_indices, std::vector< size_t > unused_dust_indices, const size_t fake_outs_count, const uint64_t unlock_time, uint32_t priority, const std::vector< uint8_t > extra, bool trusted_daemon) |
| std::vector< pending_tx > | create_unmixable_sweep_transactions (bool trusted_daemon) |
| bool | check_connection (uint32_t *version=NULL, uint32_t timeout=200000) |
| void | get_transfers (wallet2::transfer_container &incoming_transfers) const |
| void | save_transfers_to_csv (bool in, bool out, uint64_t min_height, uint64_t max_height) |
| void | get_payments (const crypto::hash &payment_id, std::list< wallet2::payment_details > &payments, uint64_t min_height=0) 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 |
| 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 |
| void | get_unconfirmed_payments_out (std::list< std::pair< crypto::hash, wallet2::unconfirmed_transfer_details >> &unconfirmed_payments) const |
| void | get_unconfirmed_payments (std::list< std::pair< crypto::hash, wallet2::payment_details >> &unconfirmed_payments) const |
| uint64_t | get_blockchain_current_height () const |
| void | rescan_spent () |
| void | rescan_blockchain (bool refresh=true) |
| bool | is_transfer_unlocked (const transfer_details &td) const |
| template<class t_archive > | |
| void | serialize (t_archive &a, const unsigned int ver) |
| bool | always_confirm_transfers () const |
| void | always_confirm_transfers (bool always) |
| bool | print_ring_members () const |
| void | print_ring_members (bool value) |
| bool | store_tx_info () const |
| void | store_tx_info (bool store) |
| uint32_t | get_default_priority () const |
| void | set_default_priority (uint32_t p) |
| bool | auto_refresh () const |
| void | auto_refresh (bool r) |
| bool | confirm_missing_payment_id () const |
| void | confirm_missing_payment_id (bool always) |
| bool | ask_password () const |
| void | ask_password (bool always) |
| void | set_default_decimal_point (unsigned int decimal_point) |
| unsigned int | get_default_decimal_point () const |
| 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) |
| bool | display_progress_indicator () const |
| void | display_progress_indicator (bool always) |
| bool | get_tx_key (const crypto::hash &txid, crypto::secret_key &tx_key) const |
| std::vector< address_book_row > | get_address_book () const |
| GUI Address book get/store. More... | |
| bool | add_address_book_row (const cryptonote::account_public_address &address, const crypto::hash &payment_id, const std::string &description) |
| bool | delete_address_book_row (std::size_t row_id) |
| uint64_t | get_num_rct_outputs () |
| const transfer_details & | get_transfer_details (size_t idx) const |
| 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_approximate_blockchain_height () const |
| Calculates the approximate blockchain height from current date/time. More... | |
| std::vector< size_t > | select_available_outputs_from_histogram (uint64_t count, bool atleast, bool unlocked, bool allow_rct, bool trusted_daemon) |
| std::vector< size_t > | select_available_outputs (const std::function< bool(const transfer_details &td)> &f) |
| std::vector< size_t > | select_available_unmixable_outputs (bool trusted_daemon) |
| std::vector< size_t > | select_available_mixable_outputs (bool trusted_daemon) |
| size_t | pop_best_value_from (const transfer_container &transfers, std::vector< size_t > &unused_dust_indices, const std::list< size_t > &selected_transfers, bool smallest=false) const |
| size_t | pop_best_value (std::vector< size_t > &unused_dust_indices, const std::list< size_t > &selected_transfers, bool smallest=false) const |
| void | set_tx_note (const crypto::hash &txid, const std::string ¬e) |
| std::string | get_tx_note (const crypto::hash &txid) const |
| std::string | sign (const std::string &data) const |
| bool | verify (const std::string &data, const cryptonote::account_public_address &address, const std::string &signature) const |
| std::vector< tools::wallet2::transfer_details > | export_outputs () const |
| size_t | import_outputs (const std::vector< tools::wallet2::transfer_details > &outputs) |
| bool | export_key_images (const std::string filename) |
| std::vector< std::pair< crypto::key_image, crypto::signature > > | export_key_images () const |
| uint64_t | import_key_images (const std::vector< std::pair< crypto::key_image, crypto::signature >> &signed_key_images, uint64_t &spent, uint64_t &unspent) |
| uint64_t | import_key_images (const std::string &filename, uint64_t &spent, uint64_t &unspent) |
| void | update_pool_state (bool refreshed=false) |
| std::string | encrypt (const std::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 |
| std::string | 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) |
| bool | parse_uri (const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector< std::string > &unknown_parameters, std::string &error) |
| uint64_t | get_blockchain_height_by_date (uint16_t year, uint8_t month, uint8_t day) |
| bool | is_synced () const |
| std::vector< std::pair< uint64_t, uint64_t > > | estimate_backlog (uint64_t min_blob_size, uint64_t max_blob_size, const std::vector< uint64_t > &fees) |
| uint64_t | get_fee_multiplier (uint32_t priority, int fee_algorithm=-1) |
| uint64_t | get_per_kb_fee () |
| void | set_blockchain_storage (etneg::MicroCore *core=nullptr, cryptonote::Blockchain *blockchain_storage=nullptr) |
| etneg::MicroCore * | get_core () const |
| cryptonote::Blockchain * | get_storage () const |
| template<typename T > | |
| void | transfer_selected (const std::vector< cryptonote::tx_destination_entry > &dsts, const std::list< size_t > selected_transfers, size_t fake_outputs_count, std::vector< std::vector< tools::wallet2::get_outs_entry >> &outs, uint64_t unlock_time, uint64_t fee, const std::vector< uint8_t > &extra, T destination_split_strategy, const tx_dust_policy &dust_policy, cryptonote::transaction &tx, pending_tx &ptx) |
Static Public Member Functions | |
| static const char * | tr (const char *str) |
| static bool | has_testnet_option (const boost::program_options::variables_map &vm) |
| static void | init_options (boost::program_options::options_description &desc_params) |
| static boost::optional< password_container > | password_prompt (const bool new_password) |
| static std::unique_ptr< wallet2 > | make_from_json (const boost::program_options::variables_map &vm, const std::string &json_file, etneg::MicroCore *core=nullptr, cryptonote::Blockchain *blockchain_storage=nullptr) |
| Uses stdin and stdout. Returns a wallet2 if no errors. More... | |
| static std::pair< std::unique_ptr< wallet2 >, password_container > | make_from_file (const boost::program_options::variables_map &vm, const std::string &wallet_file, etneg::MicroCore *core=nullptr, cryptonote::Blockchain *blockchain_storage=nullptr) |
Uses stdin and stdout. Returns a wallet2 and password for wallet_file if no errors. More... | |
| static std::pair< std::unique_ptr< wallet2 >, password_container > | make_new (const boost::program_options::variables_map &vm, etneg::MicroCore *core=nullptr, cryptonote::Blockchain *blockchain_storage=nullptr) |
| Uses stdin and stdout. Returns a wallet2 and password for wallet with no file if no errors. More... | |
| static std::unique_ptr< wallet2 > | make_dummy (const boost::program_options::variables_map &vm, etneg::MicroCore *core=nullptr, cryptonote::Blockchain *blockchain_storage=nullptr) |
| Just parses variables. More... | |
| static bool | verify_password (const std::string &keys_file_name, const std::string &password, bool watch_only) |
| verify password for specified wallet keys 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 std::string | get_human_readable_timestamp (uint64_t ts) |
| Check if wallet file path is valid format. More... | |
| static bool | wallet_valid_path_format (const std::string &file_path) |
| static bool | parse_long_payment_id (const std::string &payment_id_str, crypto::hash &payment_id) |
| static bool | parse_short_payment_id (const std::string &payment_id_str, crypto::hash8 &payment_id) |
| static bool | parse_payment_id (const std::string &payment_id_str, crypto::hash &payment_id) |
Static Public Attributes | |
| static constexpr const std::chrono::seconds | rpc_timeout = std::chrono::minutes(3) + std::chrono::seconds(30) |
Private Member Functions | |
| wallet2 (const wallet2 &) | |
| bool | store_keys (const std::string &keys_file_name, const std::string &password, bool watch_only=false) |
| Stores wallet information to wallet file. More... | |
| bool | load_keys (const std::string &keys_file_name, const std::string &password) |
| Load wallet information from wallet file. More... | |
| void | process_new_transaction (const crypto::hash &txid, const cryptonote::transaction &tx, const std::vector< uint64_t > &o_indices, uint64_t height, uint64_t ts, bool miner_tx, bool pool) |
| void | process_new_blockchain_entry (const cryptonote::block &b, const cryptonote::block_complete_entry &bche, const crypto::hash &bl_id, uint64_t height, const cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices &o_indices) |
| void | detach_blockchain (uint64_t height) |
| void | get_short_chain_history (std::list< crypto::hash > &ids) const |
| bool | is_tx_spendtime_unlocked (uint64_t unlock_time, uint64_t block_height) const |
| bool | clear () |
| void | pull_blocks (uint64_t start_height, uint64_t &blocks_start_height, const std::list< crypto::hash > &short_chain_history, std::list< cryptonote::block_complete_entry > &blocks, std::vector< cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices > &o_indices) |
| void | pull_hashes (uint64_t start_height, uint64_t &blocks_start_height, const std::list< crypto::hash > &short_chain_history, std::list< crypto::hash > &hashes) |
| void | fast_refresh (uint64_t stop_height, uint64_t &blocks_start_height, std::list< crypto::hash > &short_chain_history) |
| void | pull_next_blocks (uint64_t start_height, uint64_t &blocks_start_height, std::list< crypto::hash > &short_chain_history, const std::list< cryptonote::block_complete_entry > &prev_blocks, std::list< cryptonote::block_complete_entry > &blocks, std::vector< cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices > &o_indices, bool &error) |
| void | process_blocks (uint64_t start_height, const std::list< cryptonote::block_complete_entry > &blocks, const std::vector< cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices > &o_indices, uint64_t &blocks_added) |
| uint64_t | select_transfers (uint64_t needed_money, std::vector< size_t > unused_transfers_indices, std::list< size_t > &selected_transfers, bool trusted_daemon) |
| 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) |
| 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) |
| void | generate_genesis (cryptonote::block &b) |
| void | check_genesis (const crypto::hash &genesis_hash) const |
| bool | generate_chacha8_key_from_secret_keys (crypto::chacha8_key &key) const |
| crypto::hash | get_payment_id (const pending_tx &ptx) const |
| crypto::hash8 | get_short_payment_id (const pending_tx &ptx) const |
| void | check_acc_out_precomp (const crypto::public_key &spend_public_key, const cryptonote::tx_out &o, const crypto::key_derivation &derivation, size_t i, bool &received, uint64_t &money_transfered, bool &error) const |
| void | check_acc_out_precomp_once (const crypto::public_key &spend_public_key, const cryptonote::tx_out &o, const crypto::key_derivation &derivation, size_t i, bool &received, uint64_t &money_transfered, bool &error, 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_size_limit () |
| std::vector< uint64_t > | get_unspent_amounts_vector () |
| uint64_t | get_dynamic_per_kb_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) const |
| void | set_spent (size_t idx, uint64_t height) |
| void | set_unspent (size_t idx) |
| void | get_outs (std::vector< std::vector< get_outs_entry >> &outs, const std::list< size_t > &selected_transfers, size_t fake_outputs_count) |
| bool | wallet_generate_key_image_helper (const cryptonote::account_keys &ack, const crypto::public_key &tx_public_key, size_t real_output_index, cryptonote::keypair &in_ephemeral, crypto::key_image &ki) |
| crypto::public_key | get_tx_pub_key_from_received_outs (const tools::wallet2::transfer_details &td) 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 |
| bool | get_blocks_from_db (const cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::request &req, cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::response &res) |
| bool | get_hashes_from_db (const cryptonote::COMMAND_RPC_GET_HASHES_FAST::request &req, cryptonote::COMMAND_RPC_GET_HASHES_FAST::response &res) |
| void | load_database (const std::string blockchain_db_path) |
| cryptonote::blobdata | get_pruned_tx_blob (const cryptonote::blobdata &blobdata) |
Friends | |
| class | ::Serialization_portability_wallet_Test |
| typedef std::tuple<uint64_t, crypto::public_key, rct::key> tools::wallet2::get_outs_entry |
| typedef std::unordered_multimap<crypto::hash, payment_details> tools::wallet2::payment_container |
| typedef std::vector<transfer_details> tools::wallet2::transfer_container |
|
inlineprivate |
| bool tools::wallet2::add_address_book_row | ( | const cryptonote::account_public_address & | address, |
| const crypto::hash & | payment_id, | ||
| const std::string & | description | ||
| ) |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| uint64_t tools::wallet2::balance | ( | ) | const |
|
inline |
|
inline |
|
private |
|
private |
| bool tools::wallet2::check_connection | ( | uint32_t * | version = NULL, |
| uint32_t | timeout = 200000 |
||
| ) |
|
private |
|
private |
| void tools::wallet2::commit_tx | ( | pending_tx & | ptx_vector | ) |
| void tools::wallet2::commit_tx | ( | std::vector< pending_tx > & | ptx_vector | ) |
|
inline |
|
inline |
|
inline |
|
inline |
| std::vector< wallet2::pending_tx > tools::wallet2::create_transactions | ( | std::vector< cryptonote::tx_destination_entry > | dsts, |
| const size_t | fake_outs_count, | ||
| const uint64_t | unlock_time, | ||
| uint32_t | priority, | ||
| const std::vector< uint8_t > | extra, | ||
| bool | trusted_daemon | ||
| ) |
| std::vector< wallet2::pending_tx > tools::wallet2::create_transactions_2 | ( | std::vector< cryptonote::tx_destination_entry > | dsts, |
| const size_t | fake_outs_count, | ||
| const uint64_t | unlock_time, | ||
| uint32_t | priority, | ||
| const std::vector< uint8_t > | extra, | ||
| bool | trusted_daemon | ||
| ) |
| std::vector< wallet2::pending_tx > tools::wallet2::create_transactions_all | ( | uint64_t | below, |
| const cryptonote::account_public_address & | address, | ||
| const size_t | fake_outs_count, | ||
| const uint64_t | unlock_time, | ||
| uint32_t | priority, | ||
| const std::vector< uint8_t > | extra, | ||
| bool | trusted_daemon | ||
| ) |
| std::vector< wallet2::pending_tx > tools::wallet2::create_transactions_from | ( | const cryptonote::account_public_address & | address, |
| std::vector< size_t > | unused_transfers_indices, | ||
| std::vector< size_t > | unused_dust_indices, | ||
| const size_t | fake_outs_count, | ||
| const uint64_t | unlock_time, | ||
| uint32_t | priority, | ||
| const std::vector< uint8_t > | extra, | ||
| bool | trusted_daemon | ||
| ) |
| std::vector< wallet2::pending_tx > tools::wallet2::create_unmixable_sweep_transactions | ( | bool | trusted_daemon | ) |
| std::string tools::wallet2::decrypt | ( | const std::string & | ciphertext, |
| const crypto::secret_key & | skey, | ||
| bool | authenticated = true |
||
| ) | const |
| std::string tools::wallet2::decrypt_with_view_secret_key | ( | const std::string & | ciphertext, |
| bool | authenticated = true |
||
| ) | const |
| bool tools::wallet2::deinit | ( | ) |
| bool tools::wallet2::delete_address_book_row | ( | std::size_t | row_id | ) |
|
private |
|
inline |
|
inline |
| std::string tools::wallet2::encrypt | ( | const std::string & | plaintext, |
| const crypto::secret_key & | skey, | ||
| bool | authenticated = true |
||
| ) | const |
| std::string tools::wallet2::encrypt_with_view_secret_key | ( | const std::string & | plaintext, |
| bool | authenticated = true |
||
| ) | const |
| std::vector< std::pair< uint64_t, uint64_t > > tools::wallet2::estimate_backlog | ( | uint64_t | min_blob_size, |
| uint64_t | max_blob_size, | ||
| const std::vector< uint64_t > & | fees | ||
| ) |
| bool tools::wallet2::export_key_images | ( | const std::string | filename | ) |
| std::vector< std::pair< crypto::key_image, crypto::signature > > tools::wallet2::export_key_images | ( | ) | const |
| std::vector< tools::wallet2::transfer_details > tools::wallet2::export_outputs | ( | ) | const |
|
private |
| crypto::secret_key tools::wallet2::generate | ( | const std::string & | wallet_, |
| const std::string & | password, | ||
| const crypto::secret_key & | recovery_param = crypto::secret_key(), |
||
| bool | recover = false, |
||
| bool | two_random = false |
||
| ) |
Generates a wallet or restores one.
| wallet_ | Name of wallet file |
| password | Password of wallet file |
| recovery_param | If it is a restore, the recovery key |
| recover | Whether it is a restore |
| two_random | Whether it is a non-deterministic wallet |
| void tools::wallet2::generate | ( | const std::string & | wallet_, |
| const std::string & | password, | ||
| const cryptonote::account_public_address & | account_public_address, | ||
| const crypto::secret_key & | spendkey, | ||
| const crypto::secret_key & | viewkey | ||
| ) |
Creates a wallet from a public address and a spend/view secret key pair.
| wallet_ | Name of wallet file |
| password | Password of wallet file |
| viewkey | view secret key |
| spendkey | spend secret key |
| wallet_ | Name of wallet file |
| password | Password of wallet file |
| spendkey | spend secret key |
| viewkey | view secret key |
| void tools::wallet2::generate | ( | const std::string & | wallet_, |
| const std::string & | password, | ||
| const cryptonote::account_public_address & | account_public_address, | ||
| const crypto::secret_key & | viewkey = crypto::secret_key() |
||
| ) |
Creates a watch only wallet from a public address and a view secret key.
| wallet_ | Name of wallet file |
| password | Password of wallet file |
| viewkey | view secret key |
|
private |
|
private |
|
inline |
|
inline |
|
inline |
GUI Address book get/store.
| uint64_t tools::wallet2::get_approximate_blockchain_height | ( | ) | const |
Calculates the approximate blockchain height from current date/time.
|
inline |
| uint64_t tools::wallet2::get_blockchain_height_by_date | ( | uint16_t | year, |
| uint8_t | month, | ||
| uint8_t | day | ||
| ) |
|
private |
|
inline |
| std::string tools::wallet2::get_daemon_address | ( | ) | const |
| uint64_t tools::wallet2::get_daemon_blockchain_height | ( | std::string & | err | ) |
| uint64_t tools::wallet2::get_daemon_blockchain_target_height | ( | std::string & | err | ) |
|
inline |
| unsigned int tools::wallet2::get_default_decimal_point | ( | ) | const |
|
inline |
|
private |
| int tools::wallet2::get_fee_algorithm | ( | ) |
| uint64_t tools::wallet2::get_fee_multiplier | ( | uint32_t | priority, |
| int | fee_algorithm = -1 |
||
| ) |
| void tools::wallet2::get_hard_fork_info | ( | uint8_t | version, |
| uint64_t & | earliest_height | ||
| ) |
|
private |
|
inlinestatic |
Check if wallet file path is valid format.
| file_path | Wallet file path |
| std::string tools::wallet2::get_keys_file | ( | ) | const |
|
inline |
|
inline |
| uint64_t tools::wallet2::get_num_rct_outputs | ( | ) |
|
private |
|
private |
|
private |
|
private |
| void tools::wallet2::get_payments | ( | const crypto::hash & | payment_id, |
| std::list< wallet2::payment_details > & | payments, | ||
| uint64_t | min_height = 0 |
||
| ) | const |
| 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 |
| 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 |
| uint64_t tools::wallet2::get_per_kb_fee | ( | ) |
|
private |
|
inline |
|
inline |
| bool tools::wallet2::get_seed | ( | std::string & | electrum_words | ) | const |
| const std::string & tools::wallet2::get_seed_language | ( | ) | const |
Gets the seed language.
|
private |
|
private |
|
inline |
| const wallet2::transfer_details & tools::wallet2::get_transfer_details | ( | size_t | idx | ) | const |
| void tools::wallet2::get_transfers | ( | wallet2::transfer_container & | incoming_transfers | ) | const |
| bool tools::wallet2::get_tx_key | ( | const crypto::hash & | txid, |
| crypto::secret_key & | tx_key | ||
| ) | const |
| std::string tools::wallet2::get_tx_note | ( | const crypto::hash & | txid | ) | const |
|
private |
| void tools::wallet2::get_unconfirmed_payments | ( | std::list< std::pair< crypto::hash, wallet2::payment_details >> & | unconfirmed_payments | ) | const |
| void tools::wallet2::get_unconfirmed_payments_out | ( | std::list< std::pair< crypto::hash, wallet2::unconfirmed_transfer_details >> & | unconfirmed_payments | ) | const |
|
private |
|
private |
| std::string tools::wallet2::get_wallet_file | ( | ) | const |
|
static |
| uint64_t tools::wallet2::import_key_images | ( | const std::vector< std::pair< crypto::key_image, crypto::signature >> & | signed_key_images, |
| uint64_t & | spent, | ||
| uint64_t & | unspent | ||
| ) |
| uint64_t tools::wallet2::import_key_images | ( | const std::string & | filename, |
| uint64_t & | spent, | ||
| uint64_t & | unspent | ||
| ) |
| size_t tools::wallet2::import_outputs | ( | const std::vector< tools::wallet2::transfer_details > & | outputs | ) |
| bool tools::wallet2::init | ( | std::string | daemon_address = "http://localhost:8080", |
| boost::optional< epee::net_utils::http::login > | daemon_login = boost::none, |
||
| std::string | blockchain_db_path = "", |
||
| uint64_t | upper_transaction_size_limit = 0 |
||
| ) |
|
static |
| bool tools::wallet2::is_deprecated | ( | ) | const |
Tells if the wallet file is deprecated.
| bool tools::wallet2::is_deterministic | ( | ) | const |
Checks if deterministic wallet.
| bool tools::wallet2::is_synced | ( | ) | const |
| bool tools::wallet2::is_transfer_unlocked | ( | const transfer_details & | td | ) | const |
|
private |
| void tools::wallet2::load | ( | const std::string & | wallet, |
| const std::string & | password | ||
| ) |
|
private |
|
private |
Load wallet information from wallet file.
| keys_file_name | Name of wallet file |
| password | Password of wallet file |
| 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 |
||
| ) |
| bool tools::wallet2::load_unsigned_tx | ( | const std::string & | unsigned_filename, |
| unsigned_tx_set & | exported_txs | ||
| ) |
|
static |
Just parses variables.
|
static |
Uses stdin and stdout. Returns a wallet2 and password for wallet_file if no errors.
|
static |
Uses stdin and stdout. Returns a wallet2 if no errors.
|
static |
Uses stdin and stdout. Returns a wallet2 and password for wallet with no file if no errors.
| 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 | ||
| ) |
|
inline |
|
inline |
|
private |
|
static |
|
static |
|
static |
| 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 | ||
| ) |
|
static |
| std::string tools::wallet2::path | ( | ) | const |
|
private |
| size_t tools::wallet2::pop_best_value | ( | std::vector< size_t > & | unused_dust_indices, |
| const std::list< size_t > & | selected_transfers, | ||
| bool | smallest = false |
||
| ) | const |
| size_t tools::wallet2::pop_best_value_from | ( | const transfer_container & | transfers, |
| std::vector< size_t > & | unused_dust_indices, | ||
| const std::list< size_t > & | selected_transfers, | ||
| bool | smallest = false |
||
| ) | const |
|
private |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| void tools::wallet2::refresh | ( | ) |
| void tools::wallet2::refresh | ( | uint64_t | start_height, |
| uint64_t & | blocks_fetched | ||
| ) |
| void tools::wallet2::refresh | ( | uint64_t | start_height, |
| uint64_t & | blocks_fetched, | ||
| bool & | received_money | ||
| ) |
| void tools::wallet2::rescan_spent | ( | ) |
|
inline |
| void tools::wallet2::rewrite | ( | const std::string & | wallet_name, |
| const std::string & | password | ||
| ) |
Rewrites to the wallet file for wallet upgrade (doesn't generate key, assumes it's already there)
| wallet_name | Name of wallet file (should exist) |
| password | Password for wallet file |
| void tools::wallet2::save_transfers_to_csv | ( | bool | in, |
| bool | out, | ||
| uint64_t | min_height, | ||
| uint64_t | max_height | ||
| ) |
| bool tools::wallet2::save_tx | ( | const std::vector< pending_tx > & | ptx_vector, |
| const std::string & | filename | ||
| ) |
| std::vector< size_t > tools::wallet2::select_available_mixable_outputs | ( | bool | trusted_daemon | ) |
| std::vector< size_t > tools::wallet2::select_available_outputs | ( | const std::function< bool(const transfer_details &td)> & | f | ) |
| std::vector< size_t > tools::wallet2::select_available_outputs_from_histogram | ( | uint64_t | count, |
| bool | atleast, | ||
| bool | unlocked, | ||
| bool | allow_rct, | ||
| bool | trusted_daemon | ||
| ) |
| std::vector< size_t > tools::wallet2::select_available_unmixable_outputs | ( | bool | trusted_daemon | ) |
|
private |
|
inline |
| void tools::wallet2::set_blockchain_storage | ( | etneg::MicroCore * | core = nullptr, |
| cryptonote::Blockchain * | blockchain_storage = nullptr |
||
| ) |
| void tools::wallet2::set_default_decimal_point | ( | unsigned int | decimal_point | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void tools::wallet2::set_seed_language | ( | const std::string & | language | ) |
Sets the seed language.
| language | Seed language to set to |
|
private |
| void tools::wallet2::set_tx_note | ( | const crypto::hash & | txid, |
| const std::string & | note | ||
| ) |
|
private |
|
private |
| std::string tools::wallet2::sign | ( | const std::string & | data | ) | const |
| 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 tools::wallet2::sign_tx | ( | unsigned_tx_set & | exported_txs, |
| const std::string & | signed_filename, | ||
| std::vector< wallet2::pending_tx > & | ptx | ||
| ) |
|
inline |
| void tools::wallet2::store | ( | ) |
|
private |
Stores wallet information to wallet file.
| keys_file_name | Name of wallet file |
| password | Password of wallet file |
| watch_only | true to save only view key, false to save both spend and view keys |
| void tools::wallet2::store_to | ( | const std::string & | path, |
| const std::string & | password | ||
| ) |
store_to - stores wallet to another file(s), deleting old ones
| path | - path to the wallet file (keys and address filenames will be generated based on this filename) |
| password | - password to protect new wallet (TODO: probably better save the password in the wallet object?) |
|
inline |
|
inline |
|
inline |
|
static |
| void tools::wallet2::transfer | ( | const std::vector< cryptonote::tx_destination_entry > & | dsts, |
| const size_t | fake_outputs_count, | ||
| const std::vector< size_t > & | unused_transfers_indices, | ||
| uint64_t | unlock_time, | ||
| uint64_t | fee, | ||
| const std::vector< uint8_t > & | extra, | ||
| T | destination_split_strategy, | ||
| const tx_dust_policy & | dust_policy, | ||
| bool | trusted_daemon | ||
| ) |
| void tools::wallet2::transfer | ( | const std::vector< cryptonote::tx_destination_entry > & | dsts, |
| const size_t | fake_outputs_count, | ||
| const std::vector< size_t > & | unused_transfers_indices, | ||
| uint64_t | unlock_time, | ||
| uint64_t | fee, | ||
| const std::vector< uint8_t > & | extra, | ||
| T | destination_split_strategy, | ||
| const tx_dust_policy & | dust_policy, | ||
| cryptonote::transaction & | tx, | ||
| pending_tx & | ptx, | ||
| bool | trusted_daemon | ||
| ) |
| void tools::wallet2::transfer | ( | const std::vector< cryptonote::tx_destination_entry > & | dsts, |
| const size_t | fake_outputs_count, | ||
| const std::vector< size_t > & | unused_transfers_indices, | ||
| uint64_t | unlock_time, | ||
| uint64_t | fee, | ||
| const std::vector< uint8_t > & | extra, | ||
| bool | trusted_daemon | ||
| ) |
| void tools::wallet2::transfer | ( | const std::vector< cryptonote::tx_destination_entry > & | dsts, |
| const size_t | fake_outputs_count, | ||
| const std::vector< size_t > & | unused_transfers_indices, | ||
| uint64_t | unlock_time, | ||
| uint64_t | fee, | ||
| const std::vector< uint8_t > & | extra, | ||
| cryptonote::transaction & | tx, | ||
| pending_tx & | ptx, | ||
| bool | trusted_daemon | ||
| ) |
| void tools::wallet2::transfer_selected | ( | const std::vector< cryptonote::tx_destination_entry > & | dsts, |
| const std::list< size_t > | selected_transfers, | ||
| size_t | fake_outputs_count, | ||
| std::vector< std::vector< tools::wallet2::get_outs_entry >> & | outs, | ||
| uint64_t | unlock_time, | ||
| uint64_t | fee, | ||
| const std::vector< uint8_t > & | extra, | ||
| T | destination_split_strategy, | ||
| const tx_dust_policy & | dust_policy, | ||
| cryptonote::transaction & | tx, | ||
| pending_tx & | ptx | ||
| ) |
| void tools::wallet2::transfer_selected | ( | const std::vector< cryptonote::tx_destination_entry > & | dsts, |
| const std::list< size_t > | selected_transfers, | ||
| size_t | fake_outputs_count, | ||
| std::vector< std::vector< tools::wallet2::get_outs_entry >> & | outs, | ||
| uint64_t | unlock_time, | ||
| uint64_t | fee, | ||
| const std::vector< uint8_t > & | extra, | ||
| T | destination_split_strategy, | ||
| const tx_dust_policy & | dust_policy, | ||
| cryptonote::transaction & | tx, | ||
| pending_tx & | ptx | ||
| ) |
| void tools::wallet2::transfer_selected_rct | ( | std::vector< cryptonote::tx_destination_entry > | dsts, |
| const std::list< size_t > | selected_transfers, | ||
| size_t | fake_outputs_count, | ||
| std::vector< std::vector< tools::wallet2::get_outs_entry >> & | outs, | ||
| uint64_t | unlock_time, | ||
| uint64_t | fee, | ||
| const std::vector< uint8_t > & | extra, | ||
| cryptonote::transaction & | tx, | ||
| pending_tx & | ptx | ||
| ) |
| uint64_t tools::wallet2::unlocked_balance | ( | ) | const |
| uint64_t tools::wallet2::unlocked_dust_balance | ( | const tx_dust_policy & | dust_policy | ) | const |
| bool tools::wallet2::use_fork_rules | ( | uint8_t | version, |
| int64_t | early_blocks = 0 |
||
| ) |
| bool tools::wallet2::verify | ( | const std::string & | data, |
| const cryptonote::account_public_address & | address, | ||
| const std::string & | signature | ||
| ) | const |
|
static |
verify password for specified wallet keys file.
| keys_file_name | Keys file to verify password for |
| password | Password to verify |
| watch_only | If set = only verify view keys, otherwise also spend keys |
for verification only should not mutate state, unlike load_keys() can be used prior to rewriting wallet keys file, to ensure user has entered the correct password
| bool tools::wallet2::verify_password | ( | const std::string & | password | ) | const |
verifies given password is correct for default wallet keys file
verify password for default wallet keys file.
| password | Password to verify |
for verification only should not mutate state, unlike load_keys() can be used prior to rewriting wallet keys file, to ensure user has entered the correct password
|
static |
Check if wallet keys and bin files exist.
| file_path | Wallet file path |
| keys_file_exists | Whether keys file exists |
| wallet_file_exists | Whether bin file exists |
|
private |
|
static |
|
inline |
| void tools::wallet2::write_watch_only_wallet | ( | const std::string & | wallet_name, |
| const std::string & | password | ||
| ) |
Writes to a file named based on the normal wallet (doesn't generate key, assumes it's already there)
| wallet_name | Base name of wallet file |
| password | Password for wallet file |
|
friend |
|
private |
Whether the wallet file is of an old file format
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
request txkey to be returned in RPC, and store in the wallet cache file
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
no spend key
|
static |
|
private |
Language of the mnemonics (seed).
1.8.14