Electroneum
Loading...
Searching...
No Matches
wallet_tools.cpp File Reference
#include "wallet_tools.h"
#include <random>
Include dependency graph for wallet_tools.cpp:

Go to the source code of this file.

Macros

#define EVAL_BRK_COND()

Functions

cryptonote::account_public_address get_address (const tools::wallet2 *inp)
bool construct_tx_to_key (cryptonote::transaction &tx, tools::wallet2 *sender_wallet, const var_addr_t &to, uint64_t amount, std::vector< cryptonote::tx_source_entry > &sources, uint64_t fee, bool rct, rct::RangeProofType range_proof_type, int bp_version)
bool construct_tx_to_key (cryptonote::transaction &tx, tools::wallet2 *sender_wallet, const std::vector< cryptonote::tx_destination_entry > &destinations, std::vector< cryptonote::tx_source_entry > &sources, uint64_t fee, bool rct, rct::RangeProofType range_proof_type, int bp_version)
bool construct_tx_rct (tools::wallet2 *sender_wallet, std::vector< cryptonote::tx_source_entry > &sources, const std::vector< cryptonote::tx_destination_entry > &destinations, const boost::optional< cryptonote::account_public_address > &change_addr, std::vector< uint8_t > extra, cryptonote::transaction &tx, uint64_t unlock_time, bool rct, rct::RangeProofType range_proof_type, int bp_version)

Macro Definition Documentation

◆ EVAL_BRK_COND

#define EVAL_BRK_COND ( )
Value:
do { \
brk_cond = 0; \
if (num_utxo && num_utxo.get() <= cur_utxo) \
brk_cond += 1; \
if (min_amount && min_amount.get() <= sum) \
brk_cond += 1; \
} while(0)

Function Documentation

◆ construct_tx_rct()

bool construct_tx_rct ( tools::wallet2 * sender_wallet,
std::vector< cryptonote::tx_source_entry > & sources,
const std::vector< cryptonote::tx_destination_entry > & destinations,
const boost::optional< cryptonote::account_public_address > & change_addr,
std::vector< uint8_t > extra,
cryptonote::transaction & tx,
uint64_t unlock_time,
bool rct,
rct::RangeProofType range_proof_type,
int bp_version )

Definition at line 278 of file wallet_tools.cpp.

279{
280 subaddresses_t & subaddresses = wallet_accessor_test::get_subaddresses(sender_wallet);
281 crypto::secret_key tx_key;
282 std::vector<crypto::secret_key> additional_tx_keys;
283 std::vector<tx_destination_entry> destinations_copy = destinations;
284 rct::RCTConfig rct_config = {range_proof_type, bp_version};
285 return construct_tx_and_get_tx_key(sender_wallet->get_account().get_keys(), subaddresses, sources, destinations_copy, change_addr, extra, tx, unlock_time, tx_key, additional_tx_keys, rct, rct_config, nullptr);
286}
std::unordered_map< crypto::public_key, cryptonote::subaddress_index > subaddresses_t
Definition chaingen.h:359
const account_keys & get_keys() const
Definition account.cpp:264
cryptonote::account_base & get_account()
Definition wallet2.h:734
static subaddresses_t & get_subaddresses(tools::wallet2 *wallet)
epee::mlocked< tools::scrubbed< ec_scalar > > secret_key
Definition crypto.h:82
bool construct_tx_and_get_tx_key(const account_keys &sender_account_keys, const std::unordered_map< crypto::public_key, subaddress_index > &subaddresses, std::vector< tx_source_entry > &sources, std::vector< tx_destination_entry > &destinations, const boost::optional< cryptonote::account_public_address > &change_addr, const std::vector< uint8_t > &extra, transaction &tx, uint64_t unlock_time, crypto::secret_key &tx_key, std::vector< crypto::secret_key > &additional_tx_keys, bool rct, const rct::RCTConfig &rct_config, rct::multisig_out *msout, const uint32_t account_major_offset, const cryptonote::network_type nettype)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ construct_tx_to_key() [1/2]

bool construct_tx_to_key ( cryptonote::transaction & tx,
tools::wallet2 * sender_wallet,
const std::vector< cryptonote::tx_destination_entry > & destinations,
std::vector< cryptonote::tx_source_entry > & sources,
uint64_t fee,
bool rct,
rct::RangeProofType range_proof_type,
int bp_version )

Definition at line 267 of file wallet_tools.cpp.

272{
273 vector<tx_destination_entry> all_destinations;
274 fill_tx_destinations(sender_wallet->get_account(), destinations, fee, sources, all_destinations, rct);
275 return construct_tx_rct(sender_wallet, sources, all_destinations, get_address(sender_wallet), std::vector<uint8_t>(), tx, 0, rct, range_proof_type, bp_version);
276}
void fill_tx_destinations(const var_addr_t &from, const std::vector< tx_destination_entry > &dests, uint64_t fee, const std::vector< tx_source_entry > &sources, std::vector< tx_destination_entry > &destinations, bool always_change)
Definition chaingen.cpp:720
cryptonote::account_public_address get_address(const tools::wallet2 *inp)
bool construct_tx_rct(tools::wallet2 *sender_wallet, std::vector< cryptonote::tx_source_entry > &sources, const std::vector< cryptonote::tx_destination_entry > &destinations, const boost::optional< cryptonote::account_public_address > &change_addr, std::vector< uint8_t > extra, cryptonote::transaction &tx, uint64_t unlock_time, bool rct, rct::RangeProofType range_proof_type, int bp_version)
Here is the call graph for this function:

◆ construct_tx_to_key() [2/2]

bool construct_tx_to_key ( cryptonote::transaction & tx,
tools::wallet2 * sender_wallet,
const var_addr_t & to,
uint64_t amount,
std::vector< cryptonote::tx_source_entry > & sources,
uint64_t fee,
bool rct,
rct::RangeProofType range_proof_type,
int bp_version )

Definition at line 257 of file wallet_tools.cpp.

261{
262 vector<tx_destination_entry> destinations;
263 fill_tx_destinations(sender_wallet->get_account(), get_address(to), amount, fee, sources, destinations, rct);
264 return construct_tx_rct(sender_wallet, sources, destinations, get_address(sender_wallet), std::vector<uint8_t>(), tx, 0, rct, range_proof_type, bp_version);
265}
cryptonote::account_public_address get_address(const var_addr_t &inp)
Definition chaingen.cpp:665
Here is the call graph for this function:

◆ get_address()

Definition at line 252 of file wallet_tools.cpp.

253{
254 return (inp)->get_account().get_keys().m_account_address;
255}
const char * inp
Here is the caller graph for this function: