Electroneum
wallet_tools.h File Reference
#include "chaingen.h"
#include "wallet/wallet2.h"
Include dependency graph for wallet_tools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tx_source_info_crate_t
 
class  wallet_accessor_test
 
class  wallet_tools
 

Typedefs

typedef std::function< bool(const tx_source_info_crate_t &info, bool &abort)> fnc_accept_tx_source_t
 

Functions

cryptonote::account_public_address get_address (const tools::wallet2 *)
 
bool construct_tx_to_key (cryptonote::transaction &tx, tools::wallet2 *from_wallet, const var_addr_t &to, uint64_t amount, std::vector< cryptonote::tx_source_entry > &sources, uint64_t fee, bool rct=false, rct::RangeProofType range_proof_type=rct::RangeProofBorromean, int bp_version=0)
 
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=0)
 
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=false, rct::RangeProofType range_proof_type=rct::RangeProofBorromean, int bp_version=0)
 

Typedef Documentation

◆ fnc_accept_tx_source_t

typedef std::function<bool(const tx_source_info_crate_t &info, bool &abort)> fnc_accept_tx_source_t

Definition at line 48 of file wallet_tools.h.

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 = false,
rct::RangeProofType  range_proof_type = rct::RangeProofBorromean,
int  bp_version = 0 
)

◆ construct_tx_to_key() [1/2]

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

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 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)
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
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 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 = 0 
)

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 }
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)
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_base & get_account()
Definition: wallet2.h:734
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
Definition: hmac_keccak.cpp:40
Here is the caller graph for this function: