35 #include <boost/program_options/options_description.hpp> 36 #include <boost/program_options/variables_map.hpp> 37 #if BOOST_VERSION >= 107400 38 #include <boost/serialization/library_version_type.hpp> 40 #include <boost/serialization/list.hpp> 41 #include <boost/serialization/vector.hpp> 42 #include <boost/serialization/deque.hpp> 43 #include <boost/thread/lock_guard.hpp> 76 #undef MONERO_DEFAULT_LOG_CATEGORY 77 #define MONERO_DEFAULT_LOG_CATEGORY "wallet.wallet2" 79 #define THROW_ON_RPC_RESPONSE_ERROR(r, error, res, method, ...) \ 81 handle_payment_changes(res, std::integral_constant<bool, HasCredits<decltype(res)>::Has>()); \ 82 throw_on_rpc_response_error(r, error, res.status, method); \ 83 THROW_WALLET_EXCEPTION_IF(res.status != CORE_RPC_STATUS_OK, ## __VA_ARGS__); \ 86 #define THROW_ON_RPC_RESPONSE_ERROR_GENERIC(r, err, res, method) \ 87 THROW_ON_RPC_RESPONSE_ERROR(r, err, res, method, tools::error::wallet_generic_rpc_error, method, res.status) 89 class Serialization_portability_wallet_Test;
111 static constexpr
result_type max() {
return std::numeric_limits<result_type>::max(); }
116 std::gamma_distribution<double>
gamma;
147 virtual boost::optional<epee::wipeable_string>
on_get_password(
const char *reason) {
return boost::none; }
209 template <
class t_archive>
233 friend class ::Serialization_portability_wallet_Test;
234 friend class ::wallet_accessor_test;
238 static constexpr
const std::chrono::seconds
rpc_timeout = std::chrono::minutes(3) + std::chrono::seconds(30);
244 RefreshDefault = RefreshOptimizeCoinbase,
248 AskPasswordNever = 0,
249 AskPasswordOnAction = 1,
250 AskPasswordToDecrypt = 2,
254 BackgroundMiningMaybe = 0,
255 BackgroundMiningYes = 1,
256 BackgroundMiningNo = 2,
260 BackgroundSyncOff = 0,
261 BackgroundSyncReusePassword = 1,
262 BackgroundSyncCustomPassword = 2,
267 if (background_sync_type_str ==
"off")
return BackgroundSyncOff;
268 if (background_sync_type_str ==
"reuse-wallet-password")
return BackgroundSyncReusePassword;
269 if (background_sync_type_str ==
"custom-background-password")
return BackgroundSyncCustomPassword;
270 throw std::logic_error(
"Unknown background sync type");
278 static const char*
tr(
const char*
str);
280 static bool has_testnet_option(
const boost::program_options::variables_map&
vm);
281 static bool has_stagenet_option(
const boost::program_options::variables_map&
vm);
282 static std::string device_name_option(
const boost::program_options::variables_map&
vm);
283 static std::string device_derivation_path_option(
const boost::program_options::variables_map &
vm);
284 static void init_options(boost::program_options::options_description& desc_params);
287 static std::pair<std::unique_ptr<wallet2>,
password_container> 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);
291 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);
294 static std::pair<std::unique_ptr<wallet2>,
password_container> make_new(
const boost::program_options::variables_map&
vm,
bool unattended,
const std::function<boost::optional<password_container>(
const char *,
bool)> &password_prompter);
297 static std::unique_ptr<wallet2> make_dummy(
const boost::program_options::variables_map&
vm,
bool unattended,
const std::function<boost::optional<password_container>(
const char *,
bool)> &password_prompter);
302 return verify_password(keys_file_name, password, no_spend_key, hwdev, kdf_rounds, spend_key);
330 FIELD(m_partial_key_images)
342 boost::optional<cryptonote::subaddress_receive_info>
received;
368 std::vector<std::pair<uint64_t, crypto::hash>>
m_uses;
378 return output_public_key;
382 FIELD(m_block_height)
385 FIELD(m_internal_output_index)
386 FIELD(m_global_output_index)
389 FIELD(m_spent_height)
394 FIELD(m_key_image_known)
395 FIELD(m_key_image_request)
397 FIELD(m_subaddr_index)
398 FIELD(m_key_image_partial)
400 FIELD(m_multisig_info)
439 FIELD(m_additional_tx_keys)
468 FIELD(m_subaddr_index)
486 FIELD(m_double_spend_seen)
497 std::vector<cryptonote::tx_destination_entry>
m_dests;
503 std::vector<std::pair<crypto::key_image, std::vector<uint64_t>>>
m_rings;
518 FIELD(m_subaddr_indices)
530 std::vector<cryptonote::tx_destination_entry>
m_dests;
536 std::vector<std::pair<crypto::key_image, std::vector<uint64_t>>>
m_rings;
540 m_tx(utd.m_tx), m_amount_in(utd.m_amount_in), m_amount_out(utd.m_amount_out), m_change(utd.m_change), m_block_height(height), m_dests(utd.m_dests), m_payment_id(utd.m_payment_id), m_timestamp(utd.m_timestamp), m_unlock_time(utd.m_tx.unlock_time), m_subaddr_account(utd.m_subaddr_account), m_subaddr_indices(utd.m_subaddr_indices), m_rings(utd.m_rings) {}
555 FIELD(m_subaddr_indices)
562 std::vector<cryptonote::tx_source_entry>
sources;
571 std::vector<cryptonote::tx_destination_entry>
dests;
578 _use_view_tags = 1 << 1
589 FIELD(selected_transfers)
595 if (!typename Archive<W>::is_saving())
597 FIELD_N(
"use_rct", construction_flags)
598 use_rct = (construction_flags & _use_rct) > 0;
599 use_view_tags = (construction_flags & _use_view_tags) > 0;
603 construction_flags = 0;
605 construction_flags ^= _use_rct;
607 construction_flags ^= _use_view_tags;
609 FIELD_N(
"use_rct", construction_flags)
614 FIELD(subaddr_account)
615 FIELD(subaddr_indices)
626 std::unordered_set<crypto::public_key>
ignore;
665 std::vector<cryptonote::tx_destination_entry>
dests;
676 FIELD(dust_added_to_fee)
678 FIELD(selected_transfers)
681 FIELD(additional_tx_keys)
683 FIELD(construction_data)
690 FIELD(multisig_tx_key_entropy)
698 std::vector<tx_construction_data>
txes;
699 std::tuple<uint64_t, uint64_t, wallet2::transfer_container>
transfers;
700 std::tuple<uint64_t, uint64_t, std::vector<wallet2::exported_transfer_details>>
new_transfers;
707 std::pair<size_t, wallet2::transfer_container> v0_transfers;
709 std::get<0>(transfers) = std::get<0>(v0_transfers);
710 std::get<1>(transfers) = std::get<0>(v0_transfers) + std::get<1>(v0_transfers).
size();
711 std::get<2>(transfers) = std::get<1>(v0_transfers);
716 std::pair<size_t, std::vector<wallet2::exported_transfer_details>> v1_transfers;
718 std::get<0>(new_transfers) = std::get<0>(v1_transfers);
719 std::get<1>(new_transfers) = std::get<0>(v1_transfers) + std::get<1>(v1_transfers).
size();
720 std::get<2>(new_transfers) = std::get<1>(v1_transfers);
730 std::vector<pending_tx>
ptx;
755 crypto::chacha_iv
iv;
766 crypto::chacha_iv
iv;
789 FIELD(m_is_subaddress)
790 FIELD(m_has_payment_id)
809 FIELD(shared_secret_sig)
828 if (!
tx.serialize_base(
ar))
831 FIELD(output_indices)
834 FIELD(double_spend_seen)
840 bool first_refresh_done =
false;
852 FIELD(first_refresh_done)
855 FIELD(wallet_refresh_from_block_height)
868 std::vector<cryptonote::transaction>
txes;
877 std::vector<boost::optional<cryptonote::subaddress_receive_info>>
received;
936 bool two_random =
false,
bool create_address_file =
false);
975 const std::vector<std::string> &kex_messages,
983 const std::vector<std::string> &kex_messages,
984 const bool force_update_use_with_caution =
false);
999 size_t import_multisig(std::vector<cryptonote::blobdata>
info);
1032 boost::optional<wallet2::keys_file_data> get_keys_file_data(
const epee::wipeable_string& password,
bool watch_only);
1037 boost::optional<wallet2::cache_file_data> get_cache_file_data();
1045 bool has_proxy_option()
const;
1055 void encrypt_keys(
const crypto::chacha_key &
key);
1057 void decrypt_keys(
const crypto::chacha_key &
key);
1071 boost::optional<epee::net_utils::http::login> daemon_login = boost::none,
1073 uint64_t upper_transaction_weight_limit = 0,
1074 bool trusted_daemon =
true,
1077 boost::optional<epee::net_utils::http::login> daemon_login = boost::none,
bool trusted_daemon =
true,
1082 void stop() { m_run.store(
false, std::memory_order_relaxed); m_message_store.stop(); }
1093 bool is_deterministic()
const;
1111 void set_seed_language(
const std::string &language);
1118 std::vector<crypto::public_key> get_subaddress_spend_public_keys(
uint32_t account,
uint32_t begin,
uint32_t end)
const;
1122 void add_subaddress_account(
const std::string& label);
1142 bool is_deprecated()
const;
1143 void refresh(
bool trusted_daemon);
1144 void refresh(
bool trusted_daemon,
uint64_t start_height,
uint64_t & blocks_fetched);
1145 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());
1146 bool refresh(
bool trusted_daemon,
uint64_t & blocks_fetched,
bool& received_money,
bool& ok);
1155 bool has_multisig_partial_key_images()
const;
1156 bool has_unknown_key_images()
const;
1158 bool key_on_device()
const {
return get_device_type() != hw::device::device_type::SOFTWARE; }
1160 bool reconnect_device();
1166 std::map<uint32_t, uint64_t> balance_per_subaddress(
uint32_t subaddr_index_major,
bool strict)
const;
1167 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);
1169 uint64_t balance_all(
bool strict)
const;
1171 template<
typename T>
1172 void transfer_selected(
const std::vector<cryptonote::tx_destination_entry>& dsts,
const std::vector<size_t>& selected_transfers,
size_t fake_outputs_count,
1173 std::vector<std::vector<tools::wallet2::get_outs_entry>> &outs, std::unordered_set<crypto::public_key> &valid_public_keys_cache,
1175 void transfer_selected_rct(std::vector<cryptonote::tx_destination_entry> dsts,
const std::vector<size_t>& selected_transfers,
size_t fake_outputs_count,
1176 std::vector<std::vector<tools::wallet2::get_outs_entry>> &outs, std::unordered_set<crypto::public_key> &valid_public_keys_cache,
1179 void commit_tx(pending_tx& ptx_vector);
1180 void commit_tx(std::vector<pending_tx>& ptx_vector);
1181 bool save_tx(
const std::vector<pending_tx>& ptx_vector,
const std::string &filename)
const;
1182 std::string dump_tx_to_str(
const std::vector<pending_tx> &ptx_vector)
const;
1183 std::string save_multisig_tx(multisig_tx_set txs);
1184 bool save_multisig_tx(
const multisig_tx_set &txs,
const std::string &filename);
1185 std::string save_multisig_tx(
const std::vector<pending_tx>& ptx_vector);
1186 bool save_multisig_tx(
const std::vector<pending_tx>& ptx_vector,
const std::string &filename);
1187 multisig_tx_set make_multisig_tx_set(
const std::vector<pending_tx>& ptx_vector)
const;
1189 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);
1197 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);
1198 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);
1199 std::vector<wallet2::pending_tx> 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 = {});
1202 std::vector<wallet2::pending_tx> 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);
1203 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;
1204 void cold_tx_aux_import(
const std::vector<pending_tx>&
ptx,
const std::vector<std::string>& tx_device_aux);
1205 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);
1207 void device_show_address(
uint32_t account_index,
uint32_t address_index,
const boost::optional<crypto::hash8> &payment_id);
1210 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);
1211 bool sign_multisig_tx_from_file(
const std::string &filename, std::vector<crypto::hash> &txids, std::function<
bool(
const multisig_tx_set&)> accept_func);
1212 bool sign_multisig_tx(multisig_tx_set &
exported_txs, std::vector<crypto::hash> &txids);
1213 bool sign_multisig_tx_to_file(multisig_tx_set &
exported_txs,
const std::string &filename, std::vector<crypto::hash> &txids);
1214 std::vector<pending_tx> create_unmixable_sweep_transactions();
1215 void discard_unmixable_outputs();
1216 bool check_connection(
uint32_t *
version = NULL,
bool *ssl = NULL,
uint32_t timeout = 200000,
bool *wallet_is_outdated = NULL,
bool *daemon_is_outdated = NULL);
1217 bool check_version(
uint32_t *
version,
bool *wallet_is_outdated,
bool *daemon_is_outdated);
1218 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);
1220 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;
1221 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;
1222 void get_payments_out(std::list<std::pair<crypto::hash,wallet2::confirmed_transfer_details>>& confirmed_payments,
1223 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;
1224 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;
1225 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;
1228 void rescan_spent();
1229 void rescan_blockchain(
bool hard,
bool refresh =
true,
bool keep_key_images =
false);
1230 bool is_transfer_unlocked(
const transfer_details& td);
1236 std::vector<cryptonote::public_node> get_public_nodes(
bool white_only =
true);
1238 template <
class t_archive>
1259 a & m_account_public_address;
1260 a & m_key_images.parent();
1263 a & m_unconfirmed_txs.parent();
1266 a & m_payments.parent();
1269 a & m_tx_keys.parent();
1272 a & m_confirmed_txs.parent();
1275 a & dummy_refresh_height;
1278 a & m_tx_notes.parent();
1284 std::unordered_map<crypto::hash, payment_details> m;
1286 m_unconfirmed_payments.clear();
1287 for (std::unordered_map<crypto::hash, payment_details>::const_iterator
i = m.begin();
i != m.end(); ++
i)
1296 for (
size_t i = 0;
i < m_transfers.size(); ++
i)
1303 a & m_pub_keys.parent();
1312 std::unordered_multimap<crypto::hash, payment_details> m;
1314 m_unconfirmed_payments.clear();
1315 for (
const auto &
i: m)
1320 a & m_scanned_pool_txs[0];
1321 a & m_scanned_pool_txs[1];
1324 a & m_subaddresses.parent();
1325 std::unordered_map<cryptonote::subaddress_index, crypto::public_key> dummy_subaddresses_inv;
1326 a & dummy_subaddresses_inv;
1327 a & m_subaddress_labels;
1328 a & m_additional_tx_keys.parent();
1331 a & m_attributes.parent();
1334 a & m_unconfirmed_payments.parent();
1337 a & (std::pair<std::map<std::string, std::string>, std::vector<std::string>>&)m_account_tags;
1340 a & m_ring_history_saved;
1343 a & m_last_block_reward;
1346 a & m_tx_device.parent();
1349 a & m_device_last_key_image_sync;
1352 a & m_cold_key_images.parent();
1355 a & m_rpc_client_secret_key;
1358 m_has_ever_refreshed_from_node =
false;
1361 a & m_has_ever_refreshed_from_node;
1367 a & m_background_sync_data;
1375 FIELD(m_account_public_address)
1377 FIELD(m_unconfirmed_txs)
1380 FIELD(m_confirmed_txs)
1382 FIELD(m_unconfirmed_payments)
1384 FIELD(m_address_book)
1385 FIELD(m_scanned_pool_txs[0])
1386 FIELD(m_scanned_pool_txs[1])
1387 FIELD(m_subaddresses)
1388 FIELD(m_subaddress_labels)
1389 FIELD(m_additional_tx_keys)
1391 FIELD(m_account_tags)
1392 FIELD(m_ring_history_saved)
1393 FIELD(m_last_block_reward)
1395 FIELD(m_device_last_key_image_sync)
1396 FIELD(m_cold_key_images)
1397 FIELD(m_rpc_client_secret_key)
1400 m_has_ever_refreshed_from_node =
false;
1403 FIELD(m_has_ever_refreshed_from_node)
1409 FIELD(m_background_sync_data)
1418 static
void wallet_exists(
const std::
string& file_path,
bool& keys_file_exists,
bool& wallet_file_exists);
1424 static
bool wallet_valid_path_format(
const std::
string& file_path);
1425 static
std::
string make_background_wallet_file_name(
const std::
string &wallet_file);
1426 static
std::
string make_background_keys_file_name(
const std::
string &wallet_file);
1427 static
bool parse_long_payment_id(
const std::
string& payment_id_str,
crypto::
hash& payment_id);
1428 static
bool parse_short_payment_id(
const std::
string& payment_id_str,
crypto::
hash8& payment_id);
1429 static
bool parse_payment_id(
const std::
string& payment_id_str,
crypto::
hash& payment_id);
1431 bool always_confirm_transfers()
const {
return m_always_confirm_transfers; }
1476 void setup_background_sync(BackgroundSyncType background_sync_type,
const epee::wipeable_string &wallet_password,
const boost::optional<epee::wipeable_string> &background_cache_password);
1506 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);
1520 void scan_tx(
const std::unordered_set<crypto::hash> &txids);
1547 bool delete_address_book_row(std::size_t row_id);
1551 const transfer_details &get_transfer_details(
size_t idx)
const;
1553 uint8_t get_current_hard_fork();
1556 int get_fee_algorithm();
1561 const boost::optional<epee::net_utils::http::login>&
get_daemon_login()
const {
return m_daemon_login; }
1564 uint64_t get_daemon_adjusted_time();
1569 uint64_t get_approximate_blockchain_height()
const;
1570 uint64_t estimate_blockchain_height();
1571 std::vector<size_t> select_available_outputs_from_histogram(
uint64_t count,
bool atleast,
bool unlocked,
bool allow_rct);
1572 std::vector<size_t> select_available_outputs(
const std::function<
bool(
const transfer_details &td)> &f);
1573 std::vector<size_t> select_available_unmixable_outputs();
1574 std::vector<size_t> select_available_mixable_outputs();
1576 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;
1577 size_t pop_best_value(std::vector<size_t> &unused_dust_indices,
const std::vector<size_t>& selected_transfers,
bool smallest =
false)
const;
1592 const std::pair<serializable_map<std::string, std::string>, std::vector<std::string>>& get_account_tags();
1598 void set_account_tag(
const std::set<uint32_t> &account_indices,
const std::string&
tag);
1628 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;
1630 size_t import_outputs(
const std::tuple<
uint64_t,
uint64_t, std::vector<tools::wallet2::exported_transfer_details>> &
outputs);
1631 size_t import_outputs(
const std::tuple<
uint64_t,
uint64_t, std::vector<tools::wallet2::transfer_details>> &
outputs);
1632 size_t import_outputs_from_str(
const std::string &outputs_st);
1635 void import_payments_out(
const std::list<std::pair<crypto::hash,wallet2::confirmed_transfer_details>> &confirmed_payments);
1636 std::tuple<size_t, crypto::hash, std::vector<crypto::hash>> export_blockchain()
const;
1637 void import_blockchain(
const std::tuple<
size_t,
crypto::hash, std::vector<crypto::hash>> &bc);
1638 bool export_key_images(
const std::string &filename,
bool all =
false)
const;
1639 std::pair<uint64_t, std::vector<std::pair<crypto::key_image, crypto::signature>>> export_key_images(
bool all =
false)
const;
1640 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);
1642 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);
1643 bool import_key_images(
signed_tx_set & signed_tx,
size_t offset=0,
bool only_selected_transfers=
false);
1646 void update_pool_state(std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs,
bool refreshed =
false,
bool try_incremental =
false);
1647 void process_pool_state(
const std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &txs);
1648 void remove_obsolete_pool_txs(
const std::vector<crypto::hash> &tx_hashes,
bool remove_if_found);
1656 std::string decrypt_with_view_secret_key(
const std::string &ciphertext,
bool authenticated =
true)
const;
1665 std::vector<std::pair<uint64_t, uint64_t>> estimate_backlog(
const std::vector<std::pair<double, double>> &fee_levels);
1666 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);
1668 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);
1672 uint64_t get_fee_quantization_mask();
1681 std::pair<size_t, uint64_t> estimate_tx_size_and_weight(
bool use_rct,
int n_inputs,
int ring_size,
int n_outputs,
size_t extra_size);
1683 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);
1684 bool daemon_requires_payment();
1686 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);
1689 m_rpc_payment_state.credits =
res.credits;
1690 if (
res.top_hash != m_rpc_payment_state.top_hash)
1692 m_rpc_payment_state.top_hash =
res.top_hash;
1693 m_rpc_payment_state.stale =
true;
1700 void light_wallet_get_unspent_outs();
1702 void light_wallet_get_address_txs();
1706 bool light_wallet_login(
bool &new_address);
1710 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);
1731 const char*
const ATTRIBUTE_DESCRIPTION =
"wallet2.description";
1739 template<
class t_request,
class t_response>
1740 inline 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")
1742 if (m_offline)
return false;
1743 boost::lock_guard<boost::recursive_mutex> lock(m_daemon_rpc_mutex);
1746 template<
class t_request,
class t_response>
1747 inline 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")
1749 if (m_offline)
return false;
1750 boost::lock_guard<boost::recursive_mutex> lock(m_daemon_rpc_mutex);
1753 template<
class t_request,
class t_response>
1756 if (m_offline)
return false;
1757 boost::lock_guard<boost::recursive_mutex> lock(m_daemon_rpc_mutex);
1761 bool set_ring_database(
const std::string &filename);
1765 bool get_rings(
const crypto::chacha_key &
key,
const std::vector<crypto::key_image> &key_images, std::vector<std::vector<uint64_t>> &outs);
1767 bool set_rings(
const std::vector<std::pair<
crypto::key_image, std::vector<uint64_t>>> &rings,
bool relative);
1768 bool unset_ring(
const std::vector<crypto::key_image> &key_images);
1770 [[deprecated]]
bool find_and_save_rings(
bool force =
true);
1772 bool blackball_output(
const std::pair<uint64_t, uint64_t> &
output);
1773 bool set_blackballed_outputs(
const std::vector<std::pair<uint64_t, uint64_t>> &
outputs,
bool add =
false);
1774 bool unblackball_output(
const std::pair<uint64_t, uint64_t> &
output);
1775 bool is_output_blackballed(
const std::pair<uint64_t, uint64_t> &
output)
const;
1777 void freeze(
size_t idx);
1778 void thaw(
size_t idx);
1779 bool frozen(
size_t idx)
const;
1783 bool frozen(
const transfer_details &td)
const;
1784 bool frozen(
const multisig_tx_set& txs)
const;
1786 bool save_to_file(
const std::string& path_to_file,
const std::string& binary,
bool is_printable =
false)
const;
1787 static bool load_from_file(
const std::string& path_to_file,
std::string& target_str,
size_t max_size = 1000000000);
1790 uint64_t get_bytes_received()
const;
1792 void start_background_sync();
1800 bool lock_keys_file();
1801 bool unlock_keys_file();
1802 bool is_keys_file_locked()
const;
1806 void set_tx_notify(
const std::shared_ptr<tools::Notify> ¬ify) { m_tx_notify = notify; }
1808 bool is_tx_spendtime_unlocked(
uint64_t unlock_time,
uint64_t block_height);
1813 void set_offline(
bool offline =
true);
1817 void credit_report(
uint64_t &expected_spent,
uint64_t &discrepancy)
const { expected_spent = m_rpc_payment_state.expected_spent; discrepancy = m_rpc_payment_state.discrepancy; }
1830 bool store_keys(
const std::string& keys_file_name,
const crypto::chacha_key&
key,
bool watch_only =
false,
bool background_keys_file =
false);
1831 boost::optional<wallet2::keys_file_data> get_keys_file_data(
const crypto::chacha_key&
key,
bool watch_only =
false,
bool background_keys_file =
false);
1846 void load_wallet_cache(
const bool use_fs,
const std::string& cache_buf =
"");
1847 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);
1850 detached_blockchain_data detach_blockchain(
uint64_t height, std::map<std::pair<uint64_t, uint64_t>,
size_t> *output_tracker_cache = NULL);
1851 void handle_reorg(
uint64_t height, std::map<std::pair<uint64_t, uint64_t>,
size_t> *output_tracker_cache = NULL);
1852 void get_short_chain_history(std::list<crypto::hash>& ids,
uint64_t granularity = 1)
const;
1854 void clear_soft(
bool keep_key_images=
false);
1863 void clear_user_data();
1864 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 ¤t_height);
1865 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);
1866 void fast_refresh(
uint64_t stop_height,
uint64_t &blocks_start_height, std::list<crypto::hash> &short_chain_history,
bool force =
false);
1867 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);
1868 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);
1869 bool accept_pool_tx_for_processing(
const crypto::hash &txid);
1872 void update_pool_state_by_pool_query(std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs,
bool refreshed =
false);
1873 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);
1874 uint64_t select_transfers(
uint64_t needed_money, std::vector<size_t> unused_transfers_indices, std::vector<size_t>& selected_transfers)
const;
1875 bool prepare_file_names(
const std::string& file_path);
1880 void check_genesis(
const crypto::hash& genesis_hash)
const;
1881 bool generate_chacha_key_from_secret_keys(crypto::chacha_key &
key)
const;
1884 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;
1885 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;
1886 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;
1888 uint64_t get_upper_transaction_weight_limit();
1889 std::vector<uint64_t> get_unspent_amounts_vector(
bool strict);
1890 uint64_t get_dynamic_base_fee_estimate();
1891 float get_output_relatedness(
const transfer_details &td0,
const transfer_details &td1)
const;
1892 std::vector<size_t> pick_preferred_rct_inputs(
uint64_t needed_money,
uint32_t subaddr_account,
const std::set<uint32_t> &subaddr_indices);
1893 void set_spent(
size_t idx,
uint64_t height);
1894 void set_unspent(
size_t idx);
1895 bool is_spent(
const transfer_details &td,
bool strict =
true)
const;
1896 bool is_spent(
size_t idx,
bool strict =
true)
const;
1897 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);
1898 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);
1899 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;
1900 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;
1901 std::vector<size_t> get_only_rct(
const std::vector<size_t> &unused_dust_indices,
const std::vector<size_t> &unused_transfers_indices)
const;
1902 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);
1903 void trim_hashchain();
1905 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;
1907 void get_multisig_k(
size_t idx,
const std::unordered_set<rct::key> &used_L,
rct::key &nonce);
1908 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);
1913 crypto::chacha_key get_ringdb_key();
1915 const crypto::chacha_key get_cache_key();
1917 void verify_password_with_cached_key(
const crypto::chacha_key &
key);
1919 tx_entry_data get_tx_entries(
const std::unordered_set<crypto::hash> &txids);
1920 void sort_scan_tx_entries(std::vector<process_tx_entry_t> &unsorted_tx_entries);
1921 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);
1923 void process_background_cache_on_open();
1924 void process_background_cache(
const background_sync_data_t &background_sync_data,
const hashchain &background_chain,
uint64_t last_block_reward);
1925 void reset_background_sync_data(background_sync_data_t &background_sync_data);
1926 void store_background_cache(
const crypto::chacha_key &custom_background_key,
const bool do_reset_background_sync_data =
true);
1927 void store_background_keys(
const crypto::chacha_key &custom_background_key);
1929 bool lock_background_keys_file(
const std::string &background_keys_file);
1930 bool unlock_background_keys_file();
1931 bool is_background_keys_file_locked()
const;
1933 void register_devices();
1936 bool get_rct_distribution(
uint64_t &start_height, std::vector<uint64_t> &distribution);
1938 uint64_t get_segregation_fork_height()
const;
1941 std::shared_ptr<std::map<std::pair<uint64_t, uint64_t>,
size_t>> create_output_tracker_cache()
const;
1944 void setup_new_blockchain();
1949 void on_device_button_pressed();
1950 boost::optional<epee::wipeable_string> on_device_pin_request();
1951 boost::optional<epee::wipeable_string> on_device_passphrase_request(
bool & on_device);
1970 const std::unique_ptr<epee::net_utils::http::abstract_http_client>
m_http_client;
1989 std::pair<serializable_map<std::string, std::string>, std::vector<std::string>>
m_account_tags;
2056 std::unordered_set<crypto::hash> m_scanned_pool_txs[2];
2102 boost::optional<crypto::chacha_key> m_custom_background_key = boost::none;
2147 template<
class Archive,
class F,
class S,
class T>
2150 std::tuple<F, S, T> &
t,
2153 ar & boost::serialization::make_nvp(
"f", std::get<0>(
t));
2154 ar & boost::serialization::make_nvp(
"s", std::get<1>(
t));
2155 ar & boost::serialization::make_nvp(
"t", std::get<2>(
t));
2158 template <
class Archive>
2162 template <
class Archive>
2206 template <
class Archive>
2305 template <
class Archive>
2312 template <
class Archive>
2320 template <
class Archive>
2327 template <
class Archive>
2376 template <
class Archive>
2406 if (!
typename Archive::is_saving())
2423 template <
class Archive>
2458 template <
class Archive>
2465 template <
class Archive>
2476 bool is_long =
false;
2477 for (
int i = 8;
i < 32; ++
i)
2478 is_long |= payment_id.data[
i];
2481 MWARNING(
"Long payment ID ignored on address book load");
2503 template <
class Archive>
2514 template <
class Archive>
2521 std::pair<size_t, tools::wallet2::transfer_container> old_transfers;
2523 std::get<0>(x.
transfers) = std::get<0>(old_transfers);
2524 std::get<1>(x.
transfers) = std::get<0>(old_transfers) + std::get<1>(old_transfers).
size();
2525 std::get<2>(x.
transfers) = std::get<1>(old_transfers);
2528 throw std::runtime_error(
"Boost serialization not supported for newest unsigned_tx_set");
2531 template <
class Archive>
2541 template <
class Archive>
2550 std::list<size_t> selected_transfers;
2551 a & selected_transfers;
2554 for (
size_t t: selected_transfers)
2570 if (!
typename Archive::is_saving())
2577 if (!
typename Archive::is_saving())
2584 a & use_bulletproofs;
2585 if (!
typename Archive::is_saving())
2592 template <
class Archive>
2608 template <
class Archive>
2619 std::list<size_t> selected_transfers;
2620 a & selected_transfers;
2623 for (
size_t t: selected_transfers)
2641 template <
class Archive>
2652 template <
class Archive>
2674 std::vector<cryptonote::tx_destination_entry>& splitted_dsts, std::vector<cryptonote::tx_destination_entry> &dust_dsts)
2676 splitted_dsts.clear();
2682 [&](
uint64_t chunk) { splitted_dsts.push_back(cryptonote::tx_destination_entry(chunk, de.addr, de.is_subaddress)); },
2683 [&](
uint64_t a_dust) { splitted_dsts.push_back(cryptonote::tx_destination_entry(a_dust, de.addr, de.is_subaddress)); } );
2688 if (chunk <= dust_threshold)
2689 dust_dsts.push_back(cryptonote::tx_destination_entry(chunk, change_dst.addr, false));
2691 splitted_dsts.push_back(cryptonote::tx_destination_entry(chunk, change_dst.addr, false));
2693 [&](
uint64_t a_dust) { dust_dsts.push_back(cryptonote::tx_destination_entry(a_dust, change_dst.addr, false)); } );
2698 std::vector<cryptonote::tx_destination_entry>& splitted_dsts, std::vector<cryptonote::tx_destination_entry> &dust_dsts)
2700 splitted_dsts = dsts;
const char * res
Definition: hmac_keccak.cpp:42
Definition: binary_utils.h:36
#define tr(x)
Definition: common_defines.h:4
description
Definition: setupmingw32.py:29
crypto::hash tx_hash
Definition: wallet2.h:901
static int init(int argc, char **argv, struct runtime_vars *v)
Definition: miniupnpd.c:1149
const uint32_t T[512]
Definition: groestl_tables.h:36
Definition: rctTypes.h:122
Definition: cryptonote_config.h:303
cryptonote::COMMAND_RPC_GET_TRANSACTIONS::entry tx_entry
Definition: wallet2.h:899
const char * tag
Definition: testobsdrdr.c:19
void init_options(boost::program_options::options_description &hidden_options, boost::program_options::options_description &normal_options)
Definition: posix_daemonizer.inl:56
binary_archive< false > ar
Definition: cold-outputs.cpp:54
int * count
Definition: gmock_stress_test.cc:176
Definition: portable_binary_archive.hpp:29
#define CORE_RPC_STATUS_PAYMENT_REQUIRED
Definition: core_rpc_server_commands_defs.h:81
int i
Definition: pymoduletest.py:23
Definition: jsonrpc_structs.h:31
static constexpr crypto::hash8 null_hash8
Definition: hash.h:103
Definition: cryptonote_basic.h:538
Definition: cryptonote_protocol_defs.h:132
u
Definition: pymoduletest.py:20
static const unsigned char iv[64]
Definition: sha512-hash.c:13
crypto::public_key shared_secret
Definition: wallet2.h:798
::std::string string
Definition: gtest-port.h:1097
http_method
Definition: http_base.h:48
POD_CLASS key_derivation
Definition: crypto.h:88
Definition: cryptonote_basic.h:474
Definition: message_store.h:267
bool invoke_http_json_rpc(const boost::string_ref uri, std::string method_name, const t_request &out_struct, t_response &result_struct, epee::json_rpc::error &error_struct, t_transport &transport, std::chrono::milliseconds timeout=std::chrono::seconds(15), const boost::string_ref http_method="POST", const std::string &req_id="0")
Definition: http_abstract_invoke.h:110
bool invoke_http_json(const boost::string_ref uri, const t_request &out_struct, t_response &result_struct, t_transport &transport, std::chrono::milliseconds timeout=std::chrono::seconds(15), const boost::string_ref method="POST")
Definition: http_abstract_invoke.h:42
const char * method_name
Definition: daemon_handler.cpp:55
Definition: blockchain.py:1
t
Definition: console.py:33
void decompose_amount_into_digits(uint64_t amount, uint64_t dust_threshold, const chunk_handler_t &chunk_handler, const dust_handler_t &dust_handler)
Definition: cryptonote_format_utils.h:217
handler_function * call
Definition: daemon_handler.cpp:56
void generate(randomx::Program &p, uint32_t nonce)
Definition: perf-simulation.cpp:62
std::string data
Definition: base58.cpp:37
uint64_t index_in_tx
Definition: wallet2.h:797
const char * key
Definition: hmac_keccak.cpp:40
int type
Definition: superscalar.cpp:50
crypto namespace.
Definition: crypto.cpp:60
const char * s
Definition: minissdp.c:596
Definition: minixmlvalid.c:15
Definition: bulletproofs.cc:63
unsigned short uint16_t
Definition: stdint.h:125
bool get_output_public_key(const cryptonote::tx_out &out, crypto::public_key &output_public_key)
Definition: cryptonote_format_utils.cpp:923
Definition: wallet2.h:794
Non-owning sequence of data. Does not deep copy.
Definition: span.h:54
std::tuple< uint64_t, uint64_t, std::vector< tools::wallet2::transfer_details > > outputs
Definition: cold-outputs.cpp:53
#define FEE_PER_KB
Definition: cryptonote_config.h:70
Definition: blocks.cpp:12
unsigned char uint8_t
Definition: stdint.h:124
uint64_t real_output_in_tx_index
Definition: cryptonote_tx_utils.h:50
uint64_t amount
Definition: cryptonote_tx_utils.h:51
static std::string get_payment_id(const std::vector< uint8_t > &tx_extra)
Definition: trezor_tests.cpp:473
struct hash_func hashes[]
Definition: rctTypes.h:113
#define CORE_RPC_STATUS_OK
Definition: core_rpc_server_commands_defs.h:78
#define END_SERIALIZE()
self-explanatory
Definition: serialization.h:150
bool_constant< true > true_type
Definition: gtest-port.h:2210
std::vector< key > keyV
Definition: rctTypes.h:89
Definition: message_store.h:241
static int flags
Definition: mdb_load.c:31
Definition: cryptonote_basic.h:170
std::vector< tx_out > vout
Definition: cryptonote_basic.h:179
const crypto::secret_key null_skey
Definition: crypto.cpp:75
first
Definition: compare.py:8
Definition: core_rpc_server_commands_defs.h:392
const portMappingElt code
Definition: portlistingparse.c:22
declaration and default definition for the functions used the API
Definition: expect.cpp:33
static void add(ge_p3 &p3, const ge_cached &other)
Definition: multiexp.cc:144
Definition: chaingen.h:294
#define VERSION_FIELD(v)
Definition: serialization.h:220
unsigned int uint32_t
Definition: stdint.h:126
device_type
Definition: device.hpp:103
Definition: argon2_core.h:74
bool parse_uri(const std::string uri, http::uri_content &content)
Definition: net_parse_helpers.cpp:102
std::vector< tools::wallet2::pending_tx > ptx
Definition: cold-transaction.cpp:56
Definition: cryptonote_tx_utils.h:42
Definition: serialization.cpp:892
def verify()
Definition: gitian-build.py:101
tools::wallet2::unsigned_tx_set exported_txs
Definition: cold-transaction.cpp:53
Definition: rctTypes.h:79
size_t n_outputs
Definition: cold-outputs.cpp:56
#define ts
Definition: skein.c:522
unsigned __int64 uint64_t
Definition: stdint.h:136
Definition: subaddress_index.h:38
#define BEGIN_SERIALIZE_OBJECT()
begins the environment of the DSL for described the serialization of an object
Definition: serialization.h:131
#define CRITICAL_REGION_LOCAL(x)
Definition: syncobj.h:153
Definition: rctTypes.h:613
void load(Archive &a, std::unordered_map< h_key, hval > &x, const boost::serialization::version_type ver)
Definition: unordered_containers_boost_serialization.h:54
uint64_t amount
Definition: cryptonote_tx_utils.h:77
static constexpr crypto::hash null_hash
Definition: hash.h:102
Definition: rctTypes.h:307
Definition: device.hpp:87
#define false
Definition: stdbool.h:37
Definition: device.hpp:71
static std::string encrypt(const std::string &plaintext, const crypto::key_image &key_image, const crypto::chacha_key &key, uint8_t field)
Definition: ringdb.cpp:121
Definition: transfer.py:1
const char * Binary(const char *input, short n)
Definition: gmock-generated-actions_test.cc:95
static MDB_envinfo info
Definition: mdb_load.c:37
Definition: misc_language.h:103
POD_CLASS public_key
Definition: crypto.h:61
tools::wallet2::tx_construction_data tx_construction_data
Definition: protocol.hpp:154
uint64_t lowest_height
Definition: wallet2.h:907
cryptonote::transaction tx
Definition: wallet2.h:900
version
Supported socks variants.
Definition: socks.h:57
static crypto::public_key get_tx_pub_key_from_received_outs(const tools::wallet2::transfer_details &td)
Definition: trezor_tests.cpp:413
crypto::secret_key spendkey
Definition: cold-outputs.cpp:44
Definition: rctTypes.h:307
diff
Definition: gen_wide_data.py:42
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
r
Definition: testupnpigd.py:61
account_public_address addr
Definition: cryptonote_tx_utils.h:78
std::string blobdata
Definition: blobdatatype.h:39
const char *const str
Definition: portlistingparse.c:23
Definition: wallet2.h:904
std::unordered_map< K, V > & parent()
Definition: containers.h:52
uint64_t highest_height
Definition: wallet2.h:908
std::vector< keyV > keyM
Definition: rctTypes.h:90
#define MAGIC_FIELD(m)
Definition: serialization.h:209
network_type
Definition: cryptonote_config.h:301
randomx_vm * vm
Definition: tests.cpp:20
uint32_t address
Definition: getifaddr.c:269
POD_CLASS signature
Definition: crypto.h:98
Definition: cryptonote_basic.h:511
key identity()
Definition: rctOps.h:73
POD_CLASS hash8
Definition: hash.h:52
output
Definition: gmock_output_test.py:175
randomx_cache * cache
Definition: tests.cpp:19
crypto::signature shared_secret_sig
Definition: wallet2.h:800
string daemon_address
Definition: transfers.cpp:41
uint64_t real_output
Definition: cryptonote_tx_utils.h:47
static void ready(int code, upnpc_t *p, upnpc_device_t *d, void *data)
Definition: upnpc-libevent.c:40
POD_CLASS key_image
Definition: crypto.h:92
#define VARINT_FIELD(f)
tags and serializes the varint f
Definition: serialization.h:189
#define THROW_WALLET_EXCEPTION_IF(cond, err_type,...)
Definition: wallet_errors.h:1036
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
void * memcpy(void *a, const void *b, size_t c)
Definition: glibc_compat.cpp:16
crypto::hash get_transaction_hash(const transaction &t)
Definition: cryptonote_format_utils.cpp:1273
signed __int64 int64_t
Definition: stdint.h:135
tx_entry_data()
Definition: wallet2.h:910
std::shared_ptr< messages::monero::MoneroGetTxKeyRequest > get_tx_key(const hw::device_cold::tx_key_data_t &tx_data)
Definition: protocol.cpp:1053
cryptonote::transaction tx
Definition: transaction.cpp:40
RangeProofType range_proof_type
Definition: rctTypes.h:309
std::vector< output_entry > outputs
Definition: cryptonote_tx_utils.h:46
Definition: rctTypes.h:308
Definition: wallet2.h:897
bool_constant< false > false_type
Definition: gtest-port.h:2209
const uint8_t seed[32]
Definition: code-generator.cpp:37
Definition: cryptonote_tx_utils.h:74
Definition: wipeable_string.h:40
crypto::signature key_image_sig
Definition: wallet2.h:801
Definition: multisig.cpp:45
p
Definition: pymoduletest.py:75
BOOST_CLASS_VERSION(nodetool::peerlist_types, nodetool::CURRENT_PEERLIST_STORAGE_ARCHIVE_VER)
crypto::hash txid
Definition: wallet2.h:796
static std::string decrypt(const std::string &ciphertext, const crypto::key_image &key_image, const crypto::chacha_key &key, uint8_t field)
Definition: ringdb.cpp:136
static boost::multiprecision::uint128_t fees
Definition: blockchain_stats.cpp:58
wallet set_subaddress_lookahead(1, 1)
POD_CLASS hash
Definition: hash.h:49
std::vector< process_tx_entry_t > tx_entries
Definition: wallet2.h:906
A container for blockchain checkpoints.
Definition: checkpoints.h:52
static int priority(Level level)
Definition: easylogging++.cc:2128
std::string to_string(t_connection_type type)
Definition: connection_basic.cpp:70
crypto::key_image key_image
Definition: wallet2.h:799
std::pair< uint64_t, rct::ctkey > output_entry
Definition: cryptonote_tx_utils.h:44
std::string print_money(uint64_t amount, unsigned int decimal_point)
Definition: cryptonote_format_utils.cpp:1180
Definition: cryptonote_basic.h:157
std::enable_if< Archive::is_loading::value, void >::type initialize_transfer_details(Archive &a, tools::wallet2::transfer_details &x, const boost::serialization::version_type ver)
Definition: wallet2.h:2163
bool is_out_to_acc(const account_keys &acc, const crypto::public_key &output_public_key, const crypto::public_key &tx_pub_key, const std::vector< crypto::public_key > &additional_tx_pub_keys, size_t output_index, const boost::optional< crypto::view_tag > &view_tag_opt)
Definition: cryptonote_format_utils.cpp:1031
#define FIELD(f)
tags the field with the variable name and then serializes it
Definition: serialization.h:169
#define FIELD_N(t, f)
serializes a field f tagged t
Definition: serialization.h:158
Definition: core_rpc_server_commands_defs.h:204
Definition: wallet_tools.h:51
static __thread int depth
Definition: threadpool.cpp:34
error
Tracks LMDB error codes.
Definition: error.h:44
tuple message
Definition: gtest_output_test.py:331
#define const
Definition: ipfrdr.c:80
bool check_tx_proof(const hash &prefix_hash, const public_key &R, const public_key &A, const boost::optional< public_key > &B, const public_key &D, const signature &sig, const int version)
Definition: crypto.h:269
Definition: cryptonote_basic.h:204
#define true
Definition: stdbool.h:36
bool invoke_http_bin(const boost::string_ref uri, const t_request &out_struct, t_response &result_struct, t_transport &transport, std::chrono::milliseconds timeout=std::chrono::seconds(15), const boost::string_ref method="POST")
Definition: http_abstract_invoke.h:76
Definition: device.hpp:77
cryptonote::block b
Definition: block.cpp:40
if(!cryptonote::get_account_address_from_str_or_url(info, cryptonote::TESTNET, "9uVsvEryzpN8WH2t1WWhFFCG5tS8cBNdmJYNRuckLENFimfauV5pZKeS1P2CbxGkSDTUPHXWwiYE5ZGSXDAGbaZgDxobqDN"))
Definition: signature.cpp:53