Monero
Loading...
Searching...
No Matches
Monero::WalletImpl Class Reference

#include <wallet.h>

Inheritance diagram for Monero::WalletImpl:
Collaboration diagram for Monero::WalletImpl:

Public Member Functions

 WalletImpl (NetworkType nettype=MAINNET, uint64_t kdf_rounds=1)
 ~WalletImpl ()
bool create (const std::string &path, const std::string &password, const std::string &language)
bool createWatchOnly (const std::string &path, const std::string &password, const std::string &language) const override
 createWatchOnly - Creates a watch only wallet
bool open (const std::string &path, const std::string &password)
bool recover (const std::string &path, const std::string &password, const std::string &seed, const std::string &seed_offset={})
bool recoverFromKeysWithPassword (const std::string &path, const std::string &password, const std::string &language, const std::string &address_string, const std::string &viewkey_string, const std::string &spendkey_string="")
bool recover (const std::string &path, const std::string &seed)
bool recoverFromKeys (const std::string &path, const std::string &language, const std::string &address_string, const std::string &viewkey_string, const std::string &spendkey_string="")
bool recoverFromDevice (const std::string &path, const std::string &password, const std::string &device_name)
Device getDeviceType () const override
 Queries backing device for wallet keys.
bool close (bool store=true)
std::string seed (const std::string &seed_offset="") const override
std::string getSeedLanguage () const override
void setSeedLanguage (const std::string &arg) override
int status () const override
 returns wallet status (Status_Ok | Status_Error)
std::string errorString () const override
 in case error status, returns error string
void statusWithErrorString (int &status, std::string &errorString) const override
 returns both error and error string atomically. suggested to use in instead of status() and errorString()
bool setPassword (const std::string &password) override
const std::string & getPassword () const override
bool setDevicePin (const std::string &password) override
bool setDevicePassphrase (const std::string &password) override
std::string address (uint32_t accountIndex=0, uint32_t addressIndex=0) const override
std::string integratedAddress (const std::string &payment_id) const override
 integratedAddress - returns integrated address for current wallet address and given payment_id. if passed "payment_id" param is an empty string or not-valid payment id string (16 characters hexadecimal string) - random payment_id will be generated
std::string secretViewKey () const override
 secretViewKey - returns secret view key
std::string publicViewKey () const override
 publicViewKey - returns public view key
std::string secretSpendKey () const override
 secretSpendKey - returns secret spend key
std::string publicSpendKey () const override
 publicSpendKey - returns public spend key
std::string publicMultisigSignerKey () const override
 publicMultisigSignerKey - returns public signer key
std::string path () const override
void stop () override
 stop - interrupts wallet refresh() loop once (doesn't stop background refresh thread)
bool store (const std::string &path) override
 store - stores wallet to file.
std::string filename () const override
 filename - returns wallet filename
std::string keysFilename () const override
 keysFilename - returns keys filename. usually this formed as "wallet_filename".keys
bool init (const std::string &daemon_address, uint64_t upper_transaction_size_limit=0, const std::string &daemon_username="", const std::string &daemon_password="", bool use_ssl=false, bool lightWallet=false, const std::string &proxy_address="") override
 init - initializes wallet with daemon connection params. if daemon_address is local address, "trusted daemon" will be set to true forcibly startRefresh() should be called when wallet is initialized.
bool connectToDaemon () override
 connectToDaemon - connects to the daemon. TODO: check if it can be removed
ConnectionStatus connected () const override
 connected - checks if the wallet connected to the daemon
void setTrustedDaemon (bool arg) override
bool trustedDaemon () const override
bool setProxy (const std::string &address) override
uint64_t balance (uint32_t accountIndex=0) const override
uint64_t unlockedBalance (uint32_t accountIndex=0) const override
uint64_t blockChainHeight () const override
 blockChainHeight - returns current blockchain height
uint64_t approximateBlockChainHeight () const override
 approximateBlockChainHeight - returns approximate blockchain height calculated from date/time
uint64_t estimateBlockChainHeight () const override
 estimateBlockChainHeight - returns estimate blockchain height. More accurate than approximateBlockChainHeight, uses daemon height and falls back to calculation from date/time
uint64_t daemonBlockChainHeight () const override
 daemonBlockChainHeight - returns daemon blockchain height
uint64_t daemonBlockChainTargetHeight () const override
 daemonBlockChainTargetHeight - returns daemon blockchain target height
bool synchronized () const override
 synchronized - checks if wallet was ever synchronized
bool refresh () override
 refresh - refreshes the wallet, updating transactions from daemon
void refreshAsync () override
 refreshAsync - refreshes wallet asynchronously.
bool rescanBlockchain () override
 rescanBlockchain - rescans the wallet, updating transactions from daemon
void rescanBlockchainAsync () override
 rescanBlockchainAsync - rescans wallet asynchronously, starting from genesys
void setAutoRefreshInterval (int millis) override
 setAutoRefreshInterval - setup interval for automatic refresh.
int autoRefreshInterval () const override
 autoRefreshInterval - returns automatic refresh interval in millis
void setRefreshFromBlockHeight (uint64_t refresh_from_block_height) override
 setRefreshFromBlockHeight - start refresh from block height on recover
uint64_t getRefreshFromBlockHeight () const override
 getRestoreHeight - get wallet creation height
void setRecoveringFromSeed (bool recoveringFromSeed) override
 setRecoveringFromSeed - set state recover form seed
void setRecoveringFromDevice (bool recoveringFromDevice) override
 setRecoveringFromDevice - set state to recovering from device
void setSubaddressLookahead (uint32_t major, uint32_t minor) override
 setSubaddressLookahead - set size of subaddress lookahead
bool watchOnly () const override
 watchOnly - checks if wallet is watch only
bool isDeterministic () const override
 isDeterministic - checks if wallet keys are deterministic
bool rescanSpent () override
NetworkType nettype () const override
void hardForkInfo (uint8_t &version, uint64_t &earliest_height) const override
 returns current hard fork info
bool useForkRules (uint8_t version, int64_t early_blocks) const override
 check if hard fork rules should be used
void addSubaddressAccount (const std::string &label) override
 addSubaddressAccount - appends a new subaddress account at the end of the last major index of existing subaddress accounts
size_t numSubaddressAccounts () const override
 numSubaddressAccounts - returns the number of existing subaddress accounts
size_t numSubaddresses (uint32_t accountIndex) const override
 numSubaddresses - returns the number of existing subaddresses associated with the specified subaddress account
void addSubaddress (uint32_t accountIndex, const std::string &label) override
 addSubaddress - appends a new subaddress at the end of the last minor index of the specified subaddress account
std::string getSubaddressLabel (uint32_t accountIndex, uint32_t addressIndex) const override
 getSubaddressLabel - gets the label of the specified subaddress
void setSubaddressLabel (uint32_t accountIndex, uint32_t addressIndex, const std::string &label) override
 setSubaddressLabel - sets the label of the specified subaddress
MultisigState multisig () const override
 multisig - returns current state of multisig wallet creation process
std::string getMultisigInfo () const override
 getMultisigInfo
std::string makeMultisig (const std::vector< std::string > &info, uint32_t threshold) override
 makeMultisig - switches wallet in multisig state. The one and only creation phase for N / N wallets
std::string exchangeMultisigKeys (const std::vector< std::string > &info, const bool force_update_use_with_caution=false) override
 exchange_multisig_keys - provides additional key exchange round for arbitrary multisig schemes (like N-1/N, M/N)
bool exportMultisigImages (std::string &images) override
 exportMultisigImages - exports transfers' key images
size_t importMultisigImages (const std::vector< std::string > &images) override
 importMultisigImages - imports other participants' multisig images
bool hasMultisigPartialKeyImages () const override
 hasMultisigPartialKeyImages - checks if wallet needs to import multisig key images from other participants
PendingTransactionrestoreMultisigTransaction (const std::string &signData) override
 restoreMultisigTransaction creates PendingTransaction from signData
PendingTransactioncreateTransactionMultDest (const std::vector< std::string > &dst_addr, const std::string &payment_id, optional< std::vector< uint64_t > > amount, uint32_t mixin_count, PendingTransaction::Priority priority=PendingTransaction::Priority_Low, uint32_t subaddr_account=0, std::set< uint32_t > subaddr_indices={}) override
 createTransactionMultDest creates transaction with multiple destinations. if dst_addr is an integrated address, payment_id is ignored
PendingTransactioncreateTransaction (const std::string &dst_addr, const std::string &payment_id, optional< uint64_t > amount, uint32_t mixin_count, PendingTransaction::Priority priority=PendingTransaction::Priority_Low, uint32_t subaddr_account=0, std::set< uint32_t > subaddr_indices={}) override
 createTransaction creates transaction. if dst_addr is an integrated address, payment_id is ignored
virtual PendingTransactioncreateSweepUnmixableTransaction () override
 createSweepUnmixableTransaction creates transaction with unmixable outputs.
bool submitTransaction (const std::string &fileName) override
 submitTransaction - submits transaction in signed tx file
virtual UnsignedTransactionloadUnsignedTx (const std::string &unsigned_filename) override
 loadUnsignedTx - creates transaction from unsigned tx file
bool exportKeyImages (const std::string &filename, bool all=false) override
 exportKeyImages - exports key images to file
bool importKeyImages (const std::string &filename) override
 importKeyImages - imports key images from file
bool exportOutputs (const std::string &filename, bool all=false) override
 importOutputs - exports outputs to file
bool importOutputs (const std::string &filename) override
 importOutputs - imports outputs from file
bool scanTransactions (const std::vector< std::string > &txids) override
 scanTransactions - scan a list of transaction ids, this operation may reveal the txids to the remote node and affect your privacy
bool setupBackgroundSync (const BackgroundSyncType background_sync_type, const std::string &wallet_password, const optional< std::string > &background_cache_password=optional< std::string >()) override
 setupBackgroundSync - setup background sync mode with just a view key
BackgroundSyncType getBackgroundSyncType () const override
 getBackgroundSyncType - get mode the wallet background syncs in
bool startBackgroundSync () override
 startBackgroundSync - sync the chain in the background with just view key
bool stopBackgroundSync (const std::string &wallet_password) override
 stopBackgroundSync - bring back spend key and process background synced txs
bool isBackgroundSyncing () const override
 isBackgroundSyncing - returns true if the wallet is background syncing
bool isBackgroundWallet () const override
 isBackgroundWallet - returns true if the wallet is a background wallet
virtual void disposeTransaction (PendingTransaction *t) override
 disposeTransaction - destroys transaction object
virtual uint64_t estimateTransactionFee (const std::vector< std::pair< std::string, uint64_t > > &destinations, PendingTransaction::Priority priority) const override
 Estimates transaction fee.
virtual TransactionHistoryhistory () override
virtual AddressBookaddressBook () override
virtual Subaddresssubaddress () override
virtual SubaddressAccountsubaddressAccount () override
virtual void setListener (WalletListener *l) override
virtual uint32_t defaultMixin () const override
 defaultMixin - returns number of mixins used in transactions
virtual void setDefaultMixin (uint32_t arg) override
 setDefaultMixin - setum number of mixins to be used for new transactions
virtual bool setCacheAttribute (const std::string &key, const std::string &val) override
 setCacheAttribute - attach an arbitrary string to a wallet cache attribute
virtual std::string getCacheAttribute (const std::string &key) const override
 getCacheAttribute - return an arbitrary string attached to a wallet cache attribute
virtual void setOffline (bool offline) override
virtual bool isOffline () const override
virtual bool setUserNote (const std::string &txid, const std::string &note) override
 setUserNote - attach an arbitrary string note to a txid
virtual std::string getUserNote (const std::string &txid) const override
 getUserNote - return an arbitrary string note attached to a txid
virtual std::string getTxKey (const std::string &txid) const override
virtual bool checkTxKey (const std::string &txid, std::string tx_key, const std::string &address, uint64_t &received, bool &in_pool, uint64_t &confirmations) override
virtual std::string getTxProof (const std::string &txid, const std::string &address, const std::string &message) const override
virtual bool checkTxProof (const std::string &txid, const std::string &address, const std::string &message, const std::string &signature, bool &good, uint64_t &received, bool &in_pool, uint64_t &confirmations) override
virtual std::string getSpendProof (const std::string &txid, const std::string &message) const override
virtual bool checkSpendProof (const std::string &txid, const std::string &message, const std::string &signature, bool &good) const override
virtual std::string getReserveProof (bool all, uint32_t account_index, uint64_t amount, const std::string &message) const override
 getReserveProof - Generates a proof that proves the reserve of unspent funds Parameters account_index and amount are ignored when all is true
virtual bool checkReserveProof (const std::string &address, const std::string &message, const std::string &signature, bool &good, uint64_t &total, uint64_t &spent) const override
virtual std::string signMessage (const std::string &message, const std::string &address) override
virtual bool verifySignedMessage (const std::string &message, const std::string &address, const std::string &signature) const override
 verifySignedMessage - verify a signature matches a given message
virtual std::string signMultisigParticipant (const std::string &message) const override
 signMultisigParticipant signs given message with the multisig public signer key
virtual bool verifyMessageWithPublicKey (const std::string &message, const std::string &publicKey, const std::string &signature) const override
 verifyMessageWithPublicKey verifies that message was signed with the given public key
virtual void startRefresh () override
 StartRefresh - Start/resume refresh thread (refresh every 10 seconds).
virtual void pauseRefresh () override
 pauseRefresh - pause refresh thread
virtual 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) override
virtual std::string make_uri (const std::string &address, const std::string &payment_id, uint64_t amount, const std::string &tx_description, const std::string &recipient_name, std::string &error) const override
virtual std::string getDefaultDataDir () const override
virtual bool lightWalletLogin (bool &isNewWallet) const override
 Light wallet authenticate and login.
virtual bool lightWalletImportWalletRequest (std::string &payment_id, uint64_t &fee, bool &new_request, bool &request_fulfilled, std::string &payment_address, std::string &status) override
 Initiates a light wallet import wallet request.
virtual bool blackballOutputs (const std::vector< std::string > &outputs, bool add) override
 blackballs a set of outputs
virtual bool blackballOutput (const std::string &amount, const std::string &offset) override
 blackballs an output
virtual bool unblackballOutput (const std::string &amount, const std::string &offset) override
 unblackballs an output
virtual bool getRing (const std::string &key_image, std::vector< uint64_t > &ring) const override
 gets the ring used for a key image, if any
virtual bool getRings (const std::string &txid, std::vector< std::pair< std::string, std::vector< uint64_t > > > &rings) const override
 gets the rings used for a txid, if any
virtual bool setRing (const std::string &key_image, const std::vector< uint64_t > &ring, bool relative) override
 sets the ring used for a key image
virtual void segregatePreForkOutputs (bool segregate) override
 sets whether pre-fork outs are to be segregated
virtual void segregationHeight (uint64_t height) override
 sets the height where segregation should occur
virtual void keyReuseMitigation2 (bool mitigation) override
 secondary key reuse mitigation
virtual bool lockKeysFile () override
 locks/unlocks the keys file; returns true on success
virtual bool unlockKeysFile () override
virtual bool isKeysFileLocked () override
 returns true if the keys file is locked
virtual uint64_t coldKeyImageSync (uint64_t &spent, uint64_t &unspent) override
 cold-device protocol key image sync
virtual void deviceShowAddress (uint32_t accountIndex, uint32_t addressIndex, const std::string &paymentId) override
 shows address on device display
virtual bool reconnectDevice () override
 attempt to reconnect to hardware device
virtual uint64_t getBytesReceived () override
 get bytes received
virtual uint64_t getBytesSent () override
 get bytes sent
Public Member Functions inherited from Monero::Wallet
virtual ~Wallet ()=0
std::string mainAddress () const
bool mainnet () const
bool testnet () const
bool stagenet () const
uint64_t balanceAll () const
uint64_t unlockedBalanceAll () const

Private Member Functions

void clearStatus () const
void setStatusError (const std::string &message) const
void setStatusCritical (const std::string &message) const
void setStatus (int status, const std::string &message) const
void refreshThreadFunc ()
void doRefresh ()
bool daemonSynced () const
void stopRefresh ()
bool isNewWallet () const
void pendingTxPostProcess (PendingTransactionImpl *pending)
bool doInit (const std::string &daemon_address, const std::string &proxy_address, uint64_t upper_transaction_size_limit=0, bool ssl=false)
bool checkBackgroundSync (const std::string &message) const

Private Attributes

std::unique_ptr< tools::wallet2m_wallet
boost::mutex m_statusMutex
int m_status
std::string m_errorString
std::string m_password
std::unique_ptr< TransactionHistoryImplm_history
std::unique_ptr< Wallet2CallbackImplm_wallet2Callback
std::unique_ptr< AddressBookImplm_addressBook
std::unique_ptr< SubaddressImplm_subaddress
std::unique_ptr< SubaddressAccountImplm_subaddressAccount
std::atomic< bool > m_refreshEnabled
std::atomic< bool > m_refreshThreadDone
std::atomic< int > m_refreshIntervalMillis
std::atomic< bool > m_refreshShouldRescan
boost::mutex m_refreshMutex
boost::mutex m_refreshMutex2
boost::condition_variable m_refreshCV
boost::thread m_refreshThread
std::atomic< bool > m_recoveringFromSeed
std::atomic< bool > m_recoveringFromDevice
std::atomic< bool > m_synchronized
std::atomic< bool > m_rebuildWalletCache
std::atomic< bool > m_is_connected
boost::optional< epee::net_utils::http::loginm_daemon_login {}

Friends

class PendingTransactionImpl
class UnsignedTransactionImpl
class TransactionHistoryImpl
struct Wallet2CallbackImpl
class AddressBookImpl
class SubaddressImpl
class SubaddressAccountImpl

Additional Inherited Members

Public Types inherited from Monero::Wallet
enum  Device { Device_Software = 0 , Device_Ledger = 1 , Device_Trezor = 2 }
enum  Status { Status_Ok , Status_Error , Status_Critical }
enum  ConnectionStatus { ConnectionStatus_Disconnected , ConnectionStatus_Connected , ConnectionStatus_WrongVersion }
enum  BackgroundSyncType { BackgroundSync_Off = 0 , BackgroundSync_ReusePassword = 1 , BackgroundSync_CustomPassword = 2 }
Static Public Member Functions inherited from Monero::Wallet
static std::string displayAmount (uint64_t amount)
static uint64_t amountFromString (const std::string &amount)
static uint64_t amountFromDouble (double amount)
static std::string genPaymentId ()
static bool paymentIdValid (const std::string &paiment_id)
static bool addressValid (const std::string &str, NetworkType nettype)
static bool addressValid (const std::string &str, bool testnet)
static bool keyValid (const std::string &secret_key_string, const std::string &address_string, bool isViewKey, NetworkType nettype, std::string &error)
static bool keyValid (const std::string &secret_key_string, const std::string &address_string, bool isViewKey, bool testnet, std::string &error)
static std::string paymentIdFromAddress (const std::string &str, NetworkType nettype)
static std::string paymentIdFromAddress (const std::string &str, bool testnet)
static uint64_t maximumAllowedAmount ()
static void init (const char *argv0, const char *default_log_base_name)
static void init (const char *argv0, const char *default_log_base_name, const std::string &log_path, bool console)
static void debug (const std::string &category, const std::string &str)
static void info (const std::string &category, const std::string &str)
static void warning (const std::string &category, const std::string &str)
static void error (const std::string &category, const std::string &str)

Constructor & Destructor Documentation

◆ WalletImpl()

Monero::WalletImpl::WalletImpl ( NetworkType nettype = MAINNET,
uint64_t kdf_rounds = 1 )

◆ ~WalletImpl()

Monero::WalletImpl::~WalletImpl ( )

Member Function Documentation

◆ address()

std::string Monero::WalletImpl::address ( uint32_t accountIndex = 0,
uint32_t addressIndex = 0 ) const
overridevirtual

Implements Monero::Wallet.

◆ addressBook()

AddressBook * Monero::WalletImpl::addressBook ( )
overridevirtual

Implements Monero::Wallet.

◆ addSubaddress()

void Monero::WalletImpl::addSubaddress ( uint32_t accountIndex,
const std::string & label )
overridevirtual

addSubaddress - appends a new subaddress at the end of the last minor index of the specified subaddress account

Parameters
accountIndex- the major index specifying the subaddress account
label- the label for the new subaddress

Implements Monero::Wallet.

◆ addSubaddressAccount()

void Monero::WalletImpl::addSubaddressAccount ( const std::string & label)
overridevirtual

addSubaddressAccount - appends a new subaddress account at the end of the last major index of existing subaddress accounts

Parameters
label- the label for the new account (which is the as the label of the primary address (accountIndex,0))

Implements Monero::Wallet.

◆ approximateBlockChainHeight()

uint64_t Monero::WalletImpl::approximateBlockChainHeight ( ) const
overridevirtual

approximateBlockChainHeight - returns approximate blockchain height calculated from date/time

Returns

Implements Monero::Wallet.

◆ autoRefreshInterval()

int Monero::WalletImpl::autoRefreshInterval ( ) const
overridevirtual

autoRefreshInterval - returns automatic refresh interval in millis

Returns

Implements Monero::Wallet.

◆ balance()

uint64_t Monero::WalletImpl::balance ( uint32_t accountIndex = 0) const
overridevirtual

Implements Monero::Wallet.

◆ blackballOutput()

bool Monero::WalletImpl::blackballOutput ( const std::string & amount,
const std::string & offset )
overridevirtual

blackballs an output

Implements Monero::Wallet.

◆ blackballOutputs()

bool Monero::WalletImpl::blackballOutputs ( const std::vector< std::string > & outputs,
bool add )
overridevirtual

blackballs a set of outputs

Implements Monero::Wallet.

◆ blockChainHeight()

uint64_t Monero::WalletImpl::blockChainHeight ( ) const
overridevirtual

blockChainHeight - returns current blockchain height

Returns

Implements Monero::Wallet.

◆ checkBackgroundSync()

bool Monero::WalletImpl::checkBackgroundSync ( const std::string & message) const
private

◆ checkReserveProof()

bool Monero::WalletImpl::checkReserveProof ( const std::string & address,
const std::string & message,
const std::string & signature,
bool & good,
uint64_t & total,
uint64_t & spent ) const
overridevirtual

Implements Monero::Wallet.

◆ checkSpendProof()

bool Monero::WalletImpl::checkSpendProof ( const std::string & txid,
const std::string & message,
const std::string & signature,
bool & good ) const
overridevirtual

Implements Monero::Wallet.

◆ checkTxKey()

bool Monero::WalletImpl::checkTxKey ( const std::string & txid,
std::string tx_key,
const std::string & address,
uint64_t & received,
bool & in_pool,
uint64_t & confirmations )
overridevirtual

Implements Monero::Wallet.

◆ checkTxProof()

bool Monero::WalletImpl::checkTxProof ( const std::string & txid,
const std::string & address,
const std::string & message,
const std::string & signature,
bool & good,
uint64_t & received,
bool & in_pool,
uint64_t & confirmations )
overridevirtual

Implements Monero::Wallet.

◆ clearStatus()

void Monero::WalletImpl::clearStatus ( ) const
private

◆ close()

bool Monero::WalletImpl::close ( bool store = true)

◆ coldKeyImageSync()

uint64_t Monero::WalletImpl::coldKeyImageSync ( uint64_t & spent,
uint64_t & unspent )
overridevirtual

cold-device protocol key image sync

Implements Monero::Wallet.

◆ connected()

Wallet::ConnectionStatus Monero::WalletImpl::connected ( ) const
overridevirtual

connected - checks if the wallet connected to the daemon

Returns
- true if connected

Implements Monero::Wallet.

◆ connectToDaemon()

bool Monero::WalletImpl::connectToDaemon ( )
overridevirtual

connectToDaemon - connects to the daemon. TODO: check if it can be removed

Returns

Implements Monero::Wallet.

◆ create()

bool Monero::WalletImpl::create ( const std::string & path,
const std::string & password,
const std::string & language )

◆ createSweepUnmixableTransaction()

PendingTransaction * Monero::WalletImpl::createSweepUnmixableTransaction ( )
overridevirtual

createSweepUnmixableTransaction creates transaction with unmixable outputs.

Returns
PendingTransaction object. caller is responsible to check PendingTransaction::status() after object returned

Implements Monero::Wallet.

◆ createTransaction()

PendingTransaction * Monero::WalletImpl::createTransaction ( const std::string & dst_addr,
const std::string & payment_id,
optional< uint64_t > amount,
uint32_t mixin_count,
PendingTransaction::Priority = PendingTransaction::Priority_Low,
uint32_t subaddr_account = 0,
std::set< uint32_t > subaddr_indices = {} )
overridevirtual

createTransaction creates transaction. if dst_addr is an integrated address, payment_id is ignored

Parameters
dst_addrdestination address as string
payment_idoptional payment_id, can be empty string
amountamount
mixin_countmixin count. if 0 passed, wallet will use default value
subaddr_accountsubaddress account from which the input funds are taken
subaddr_indicesset of subaddress indices to use for transfer or sweeping. if set empty, all are chosen when sweeping, and one or more are automatically chosen when transferring. after execution, returns the set of actually used indices
priority
Returns
PendingTransaction object. caller is responsible to check PendingTransaction::status() after object returned

Implements Monero::Wallet.

◆ createTransactionMultDest()

PendingTransaction * Monero::WalletImpl::createTransactionMultDest ( const std::vector< std::string > & dst_addr,
const std::string & payment_id,
optional< std::vector< uint64_t > > amount,
uint32_t mixin_count,
PendingTransaction::Priority = PendingTransaction::Priority_Low,
uint32_t subaddr_account = 0,
std::set< uint32_t > subaddr_indices = {} )
overridevirtual

createTransactionMultDest creates transaction with multiple destinations. if dst_addr is an integrated address, payment_id is ignored

Parameters
dst_addrvector of destination address as string
payment_idoptional payment_id, can be empty string
amountvector of amounts
mixin_countmixin count. if 0 passed, wallet will use default value
subaddr_accountsubaddress account from which the input funds are taken
subaddr_indicesset of subaddress indices to use for transfer or sweeping. if set empty, all are chosen when sweeping, and one or more are automatically chosen when transferring. after execution, returns the set of actually used indices
priority
Returns
PendingTransaction object. caller is responsible to check PendingTransaction::status() after object returned

Implements Monero::Wallet.

◆ createWatchOnly()

bool Monero::WalletImpl::createWatchOnly ( const std::string & path,
const std::string & password,
const std::string & language ) const
overridevirtual

createWatchOnly - Creates a watch only wallet

Parameters
path- where to store the wallet
password
language
Returns
- true if created successfully

Implements Monero::Wallet.

◆ daemonBlockChainHeight()

uint64_t Monero::WalletImpl::daemonBlockChainHeight ( ) const
overridevirtual

daemonBlockChainHeight - returns daemon blockchain height

Returns
0 - in case error communicating with the daemon. status() will return Status_Error and errorString() will return verbose error description

Implements Monero::Wallet.

◆ daemonBlockChainTargetHeight()

uint64_t Monero::WalletImpl::daemonBlockChainTargetHeight ( ) const
overridevirtual

daemonBlockChainTargetHeight - returns daemon blockchain target height

Returns
0 - in case error communicating with the daemon. status() will return Status_Error and errorString() will return verbose error description

Implements Monero::Wallet.

◆ daemonSynced()

bool Monero::WalletImpl::daemonSynced ( ) const
private

◆ defaultMixin()

uint32_t Monero::WalletImpl::defaultMixin ( ) const
overridevirtual

defaultMixin - returns number of mixins used in transactions

Returns

Implements Monero::Wallet.

◆ deviceShowAddress()

void Monero::WalletImpl::deviceShowAddress ( uint32_t accountIndex,
uint32_t addressIndex,
const std::string & paymentId )
overridevirtual

shows address on device display

Implements Monero::Wallet.

◆ disposeTransaction()

void Monero::WalletImpl::disposeTransaction ( PendingTransaction * t)
overridevirtual

disposeTransaction - destroys transaction object

Parameters
t- pointer to the "PendingTransaction" object. Pointer is not valid after function returned;

Implements Monero::Wallet.

◆ doInit()

bool Monero::WalletImpl::doInit ( const std::string & daemon_address,
const std::string & proxy_address,
uint64_t upper_transaction_size_limit = 0,
bool ssl = false )
private

◆ doRefresh()

void Monero::WalletImpl::doRefresh ( )
private

◆ errorString()

std::string Monero::WalletImpl::errorString ( ) const
overridevirtual

in case error status, returns error string

Implements Monero::Wallet.

◆ estimateBlockChainHeight()

uint64_t Monero::WalletImpl::estimateBlockChainHeight ( ) const
overridevirtual

estimateBlockChainHeight - returns estimate blockchain height. More accurate than approximateBlockChainHeight, uses daemon height and falls back to calculation from date/time

Returns

Implements Monero::Wallet.

◆ estimateTransactionFee()

uint64_t Monero::WalletImpl::estimateTransactionFee ( const std::vector< std::pair< std::string, uint64_t > > & destinations,
PendingTransaction::Priority priority ) const
overridevirtual

Estimates transaction fee.

Parameters
destinationsVector consisting of <address, amount> pairs.
Returns
Estimated fee.

Implements Monero::Wallet.

◆ exchangeMultisigKeys()

std::string Monero::WalletImpl::exchangeMultisigKeys ( const std::vector< std::string > & info,
const bool force_update_use_with_caution = false )
overridevirtual

exchange_multisig_keys - provides additional key exchange round for arbitrary multisig schemes (like N-1/N, M/N)

Parameters
info- base58 encoded key derivations returned by makeMultisig or exchangeMultisigKeys function call
force_update_use_with_caution- force multisig account to update even if not all signers contribute round messages
Returns
new info string if more rounds required or an empty string if wallet creation is done

Implements Monero::Wallet.

◆ exportKeyImages()

bool Monero::WalletImpl::exportKeyImages ( const std::string & filename,
bool all = false )
overridevirtual

exportKeyImages - exports key images to file

Parameters
filename
all- export all key images or only those that have not yet been exported
Returns
- true on success

Implements Monero::Wallet.

◆ exportMultisigImages()

bool Monero::WalletImpl::exportMultisigImages ( std::string & images)
overridevirtual

exportMultisigImages - exports transfers' key images

Parameters
images- output paramter for hex encoded array of images
Returns
true if success

Implements Monero::Wallet.

◆ exportOutputs()

bool Monero::WalletImpl::exportOutputs ( const std::string & filename,
bool all = false )
overridevirtual

importOutputs - exports outputs to file

Parameters
filename
Returns
- true on success

Implements Monero::Wallet.

◆ filename()

string Monero::WalletImpl::filename ( ) const
overridevirtual

filename - returns wallet filename

Returns

Implements Monero::Wallet.

◆ getBackgroundSyncType()

Wallet::BackgroundSyncType Monero::WalletImpl::getBackgroundSyncType ( ) const
overridevirtual

getBackgroundSyncType - get mode the wallet background syncs in

Returns
- the type, or off if type is unknown

Implements Monero::Wallet.

◆ getBytesReceived()

uint64_t Monero::WalletImpl::getBytesReceived ( )
overridevirtual

get bytes received

Implements Monero::Wallet.

◆ getBytesSent()

uint64_t Monero::WalletImpl::getBytesSent ( )
overridevirtual

get bytes sent

Implements Monero::Wallet.

◆ getCacheAttribute()

std::string Monero::WalletImpl::getCacheAttribute ( const std::string & key) const
overridevirtual

getCacheAttribute - return an arbitrary string attached to a wallet cache attribute

Parameters
key- the key
Returns
the attached string, or empty string if there is none

Implements Monero::Wallet.

◆ getDefaultDataDir()

std::string Monero::WalletImpl::getDefaultDataDir ( ) const
overridevirtual

Implements Monero::Wallet.

◆ getDeviceType()

Wallet::Device Monero::WalletImpl::getDeviceType ( ) const
overridevirtual

Queries backing device for wallet keys.

Returns
Device they are on

Implements Monero::Wallet.

◆ getMultisigInfo()

string Monero::WalletImpl::getMultisigInfo ( ) const
overridevirtual

getMultisigInfo

Returns
serialized and signed multisig info string

Implements Monero::Wallet.

◆ getPassword()

const std::string & Monero::WalletImpl::getPassword ( ) const
overridevirtual

Implements Monero::Wallet.

◆ getRefreshFromBlockHeight()

uint64_t Monero::WalletImpl::getRefreshFromBlockHeight ( ) const
inlineoverridevirtual

getRestoreHeight - get wallet creation height

Implements Monero::Wallet.

◆ getReserveProof()

std::string Monero::WalletImpl::getReserveProof ( bool all,
uint32_t account_index,
uint64_t amount,
const std::string & message ) const
overridevirtual

getReserveProof - Generates a proof that proves the reserve of unspent funds Parameters account_index and amount are ignored when all is true

Implements Monero::Wallet.

◆ getRing()

bool Monero::WalletImpl::getRing ( const std::string & key_image,
std::vector< uint64_t > & ring ) const
overridevirtual

gets the ring used for a key image, if any

Implements Monero::Wallet.

◆ getRings()

bool Monero::WalletImpl::getRings ( const std::string & txid,
std::vector< std::pair< std::string, std::vector< uint64_t > > > & rings ) const
overridevirtual

gets the rings used for a txid, if any

Implements Monero::Wallet.

◆ getSeedLanguage()

std::string Monero::WalletImpl::getSeedLanguage ( ) const
overridevirtual

Implements Monero::Wallet.

◆ getSpendProof()

std::string Monero::WalletImpl::getSpendProof ( const std::string & txid,
const std::string & message ) const
overridevirtual

Implements Monero::Wallet.

◆ getSubaddressLabel()

std::string Monero::WalletImpl::getSubaddressLabel ( uint32_t accountIndex,
uint32_t addressIndex ) const
overridevirtual

getSubaddressLabel - gets the label of the specified subaddress

Parameters
accountIndex- the major index specifying the subaddress account
addressIndex- the minor index specifying the subaddress

Implements Monero::Wallet.

◆ getTxKey()

std::string Monero::WalletImpl::getTxKey ( const std::string & txid) const
overridevirtual

Implements Monero::Wallet.

◆ getTxProof()

std::string Monero::WalletImpl::getTxProof ( const std::string & txid,
const std::string & address,
const std::string & message ) const
overridevirtual

Implements Monero::Wallet.

◆ getUserNote()

std::string Monero::WalletImpl::getUserNote ( const std::string & txid) const
overridevirtual

getUserNote - return an arbitrary string note attached to a txid

Parameters
txid- the transaction id to attach the note to
Returns
the attached note, or empty string if there is none

Implements Monero::Wallet.

◆ hardForkInfo()

void Monero::WalletImpl::hardForkInfo ( uint8_t & version,
uint64_t & earliest_height ) const
overridevirtual

returns current hard fork info

Implements Monero::Wallet.

◆ hasMultisigPartialKeyImages()

bool Monero::WalletImpl::hasMultisigPartialKeyImages ( ) const
overridevirtual

hasMultisigPartialKeyImages - checks if wallet needs to import multisig key images from other participants

Returns
true if there are partial key images

Implements Monero::Wallet.

◆ history()

TransactionHistory * Monero::WalletImpl::history ( )
overridevirtual

Implements Monero::Wallet.

◆ importKeyImages()

bool Monero::WalletImpl::importKeyImages ( const std::string & filename)
overridevirtual

importKeyImages - imports key images from file

Parameters
filename
Returns
- true on success

Implements Monero::Wallet.

◆ importMultisigImages()

size_t Monero::WalletImpl::importMultisigImages ( const std::vector< std::string > & images)
overridevirtual

importMultisigImages - imports other participants' multisig images

Parameters
images- array of hex encoded arrays of images obtained with exportMultisigImages
Returns
number of imported images

Implements Monero::Wallet.

◆ importOutputs()

bool Monero::WalletImpl::importOutputs ( const std::string & filename)
overridevirtual

importOutputs - imports outputs from file

Parameters
filename
Returns
- true on success

Implements Monero::Wallet.

◆ init()

bool Monero::WalletImpl::init ( const std::string & daemon_address,
uint64_t upper_transaction_size_limit = 0,
const std::string & daemon_username = "",
const std::string & daemon_password = "",
bool use_ssl = false,
bool lightWallet = false,
const std::string & proxy_address = "" )
overridevirtual

init - initializes wallet with daemon connection params. if daemon_address is local address, "trusted daemon" will be set to true forcibly startRefresh() should be called when wallet is initialized.

Parameters
daemon_address- daemon address in "hostname:port" format
upper_transaction_size_limit
daemon_username
daemon_password
lightWallet- start wallet in light mode, connect to a openmonero compatible server.
proxy_address- set proxy address, empty string to disable
Returns
- true on success

Implements Monero::Wallet.

◆ integratedAddress()

std::string Monero::WalletImpl::integratedAddress ( const std::string & payment_id) const
overridevirtual

integratedAddress - returns integrated address for current wallet address and given payment_id. if passed "payment_id" param is an empty string or not-valid payment id string (16 characters hexadecimal string) - random payment_id will be generated

Parameters
payment_id- 16 characters hexadecimal string or empty string if new random payment id needs to be generated
Returns
- 106 characters string representing integrated address

Implements Monero::Wallet.

◆ isBackgroundSyncing()

bool Monero::WalletImpl::isBackgroundSyncing ( ) const
overridevirtual

isBackgroundSyncing - returns true if the wallet is background syncing

Implements Monero::Wallet.

◆ isBackgroundWallet()

bool Monero::WalletImpl::isBackgroundWallet ( ) const
overridevirtual

isBackgroundWallet - returns true if the wallet is a background wallet

Implements Monero::Wallet.

◆ isDeterministic()

bool Monero::WalletImpl::isDeterministic ( ) const
overridevirtual

isDeterministic - checks if wallet keys are deterministic

Returns
- true if deterministic

Implements Monero::Wallet.

◆ isKeysFileLocked()

bool Monero::WalletImpl::isKeysFileLocked ( )
overridevirtual

returns true if the keys file is locked

Implements Monero::Wallet.

◆ isNewWallet()

bool Monero::WalletImpl::isNewWallet ( ) const
private

◆ isOffline()

bool Monero::WalletImpl::isOffline ( ) const
overridevirtual

Implements Monero::Wallet.

◆ keyReuseMitigation2()

void Monero::WalletImpl::keyReuseMitigation2 ( bool mitigation)
overridevirtual

secondary key reuse mitigation

Implements Monero::Wallet.

◆ keysFilename()

string Monero::WalletImpl::keysFilename ( ) const
overridevirtual

keysFilename - returns keys filename. usually this formed as "wallet_filename".keys

Returns

Implements Monero::Wallet.

◆ lightWalletImportWalletRequest()

bool Monero::WalletImpl::lightWalletImportWalletRequest ( std::string & payment_id,
uint64_t & fee,
bool & new_request,
bool & request_fulfilled,
std::string & payment_address,
std::string & status )
overridevirtual

Initiates a light wallet import wallet request.

Implements Monero::Wallet.

◆ lightWalletLogin()

bool Monero::WalletImpl::lightWalletLogin ( bool & isNewWallet) const
overridevirtual

Light wallet authenticate and login.

Implements Monero::Wallet.

◆ loadUnsignedTx()

UnsignedTransaction * Monero::WalletImpl::loadUnsignedTx ( const std::string & unsigned_filename)
overridevirtual

loadUnsignedTx - creates transaction from unsigned tx file

Returns
- UnsignedTransaction object. caller is responsible to check UnsignedTransaction::status() after object returned

Implements Monero::Wallet.

◆ lockKeysFile()

bool Monero::WalletImpl::lockKeysFile ( )
overridevirtual

locks/unlocks the keys file; returns true on success

Implements Monero::Wallet.

◆ make_uri()

std::string Monero::WalletImpl::make_uri ( const std::string & address,
const std::string & payment_id,
uint64_t amount,
const std::string & tx_description,
const std::string & recipient_name,
std::string & error ) const
overridevirtual

Implements Monero::Wallet.

◆ makeMultisig()

string Monero::WalletImpl::makeMultisig ( const std::vector< std::string > & info,
uint32_t threshold )
overridevirtual

makeMultisig - switches wallet in multisig state. The one and only creation phase for N / N wallets

Parameters
info- vector of multisig infos from other participants obtained with getMulitisInfo call
threshold- number of required signers to make valid transaction. Must be <= number of participants
Returns
in case of N / N wallets returns empty string since no more key exchanges needed. For N - 1 / N wallets returns base58 encoded extra multisig info

Implements Monero::Wallet.

◆ multisig()

MultisigState Monero::WalletImpl::multisig ( ) const
overridevirtual

multisig - returns current state of multisig wallet creation process

Returns
MultisigState struct

Implements Monero::Wallet.

◆ nettype()

NetworkType Monero::WalletImpl::nettype ( ) const
inlineoverridevirtual

Implements Monero::Wallet.

◆ numSubaddressAccounts()

size_t Monero::WalletImpl::numSubaddressAccounts ( ) const
overridevirtual

numSubaddressAccounts - returns the number of existing subaddress accounts

Implements Monero::Wallet.

◆ numSubaddresses()

size_t Monero::WalletImpl::numSubaddresses ( uint32_t accountIndex) const
overridevirtual

numSubaddresses - returns the number of existing subaddresses associated with the specified subaddress account

Parameters
accountIndex- the major index specifying the subaddress account

Implements Monero::Wallet.

◆ open()

bool Monero::WalletImpl::open ( const std::string & path,
const std::string & password )

◆ parse_uri()

bool Monero::WalletImpl::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 )
overridevirtual

Implements Monero::Wallet.

◆ path()

std::string Monero::WalletImpl::path ( ) const
overridevirtual

Implements Monero::Wallet.

◆ pauseRefresh()

void Monero::WalletImpl::pauseRefresh ( )
overridevirtual

pauseRefresh - pause refresh thread

Implements Monero::Wallet.

◆ pendingTxPostProcess()

void Monero::WalletImpl::pendingTxPostProcess ( PendingTransactionImpl * pending)
private

◆ publicMultisigSignerKey()

std::string Monero::WalletImpl::publicMultisigSignerKey ( ) const
overridevirtual

publicMultisigSignerKey - returns public signer key

Returns
- public multisignature signer key or empty string if wallet is not multisig

Implements Monero::Wallet.

◆ publicSpendKey()

std::string Monero::WalletImpl::publicSpendKey ( ) const
overridevirtual

publicSpendKey - returns public spend key

Returns
- public spend key

Implements Monero::Wallet.

◆ publicViewKey()

std::string Monero::WalletImpl::publicViewKey ( ) const
overridevirtual

publicViewKey - returns public view key

Returns
- public view key

Implements Monero::Wallet.

◆ reconnectDevice()

bool Monero::WalletImpl::reconnectDevice ( )
overridevirtual

attempt to reconnect to hardware device

Implements Monero::Wallet.

◆ recover() [1/2]

bool Monero::WalletImpl::recover ( const std::string & path,
const std::string & password,
const std::string & seed,
const std::string & seed_offset = {} )

◆ recover() [2/2]

bool Monero::WalletImpl::recover ( const std::string & path,
const std::string & seed )

◆ recoverFromDevice()

bool Monero::WalletImpl::recoverFromDevice ( const std::string & path,
const std::string & password,
const std::string & device_name )

◆ recoverFromKeys()

bool Monero::WalletImpl::recoverFromKeys ( const std::string & path,
const std::string & language,
const std::string & address_string,
const std::string & viewkey_string,
const std::string & spendkey_string = "" )

◆ recoverFromKeysWithPassword()

bool Monero::WalletImpl::recoverFromKeysWithPassword ( const std::string & path,
const std::string & password,
const std::string & language,
const std::string & address_string,
const std::string & viewkey_string,
const std::string & spendkey_string = "" )

◆ refresh()

bool Monero::WalletImpl::refresh ( )
overridevirtual

refresh - refreshes the wallet, updating transactions from daemon

Returns
- true if refreshed successfully;

Implements Monero::Wallet.

◆ refreshAsync()

void Monero::WalletImpl::refreshAsync ( )
overridevirtual

refreshAsync - refreshes wallet asynchronously.

Implements Monero::Wallet.

◆ refreshThreadFunc()

void Monero::WalletImpl::refreshThreadFunc ( )
private

◆ rescanBlockchain()

bool Monero::WalletImpl::rescanBlockchain ( )
overridevirtual

rescanBlockchain - rescans the wallet, updating transactions from daemon

Returns
- true if refreshed successfully;

Implements Monero::Wallet.

◆ rescanBlockchainAsync()

void Monero::WalletImpl::rescanBlockchainAsync ( )
overridevirtual

rescanBlockchainAsync - rescans wallet asynchronously, starting from genesys

Implements Monero::Wallet.

◆ rescanSpent()

bool Monero::WalletImpl::rescanSpent ( )
overridevirtual

Implements Monero::Wallet.

◆ restoreMultisigTransaction()

PendingTransaction * Monero::WalletImpl::restoreMultisigTransaction ( const std::string & signData)
overridevirtual

restoreMultisigTransaction creates PendingTransaction from signData

Parameters
signDataencrypted unsigned transaction. Obtained with PendingTransaction::multisigSignData
Returns
PendingTransaction

Implements Monero::Wallet.

◆ scanTransactions()

bool Monero::WalletImpl::scanTransactions ( const std::vector< std::string > & txids)
overridevirtual

scanTransactions - scan a list of transaction ids, this operation may reveal the txids to the remote node and affect your privacy

Parameters
txids- list of transaction ids
Returns
- true on success

Implements Monero::Wallet.

◆ secretSpendKey()

std::string Monero::WalletImpl::secretSpendKey ( ) const
overridevirtual

secretSpendKey - returns secret spend key

Returns
- secret spend key

Implements Monero::Wallet.

◆ secretViewKey()

std::string Monero::WalletImpl::secretViewKey ( ) const
overridevirtual

secretViewKey - returns secret view key

Returns
- secret view key

Implements Monero::Wallet.

◆ seed()

std::string Monero::WalletImpl::seed ( const std::string & seed_offset = "") const
overridevirtual

Implements Monero::Wallet.

◆ segregatePreForkOutputs()

void Monero::WalletImpl::segregatePreForkOutputs ( bool segregate)
overridevirtual

sets whether pre-fork outs are to be segregated

Implements Monero::Wallet.

◆ segregationHeight()

void Monero::WalletImpl::segregationHeight ( uint64_t height)
overridevirtual

sets the height where segregation should occur

Implements Monero::Wallet.

◆ setAutoRefreshInterval()

void Monero::WalletImpl::setAutoRefreshInterval ( int millis)
overridevirtual

setAutoRefreshInterval - setup interval for automatic refresh.

Parameters
seconds- interval in millis. if zero or less than zero - automatic refresh disabled;

Implements Monero::Wallet.

◆ setCacheAttribute()

bool Monero::WalletImpl::setCacheAttribute ( const std::string & key,
const std::string & val )
overridevirtual

setCacheAttribute - attach an arbitrary string to a wallet cache attribute

Parameters
key- the key
val- the value
Returns
true if successful, false otherwise

Implements Monero::Wallet.

◆ setDefaultMixin()

void Monero::WalletImpl::setDefaultMixin ( uint32_t arg)
overridevirtual

setDefaultMixin - setum number of mixins to be used for new transactions

Parameters
arg

Implements Monero::Wallet.

◆ setDevicePassphrase()

bool Monero::WalletImpl::setDevicePassphrase ( const std::string & password)
overridevirtual

Reimplemented from Monero::Wallet.

◆ setDevicePin()

bool Monero::WalletImpl::setDevicePin ( const std::string & password)
overridevirtual

Reimplemented from Monero::Wallet.

◆ setListener()

void Monero::WalletImpl::setListener ( WalletListener * l)
overridevirtual

Implements Monero::Wallet.

◆ setOffline()

void Monero::WalletImpl::setOffline ( bool offline)
overridevirtual

Implements Monero::Wallet.

◆ setPassword()

bool Monero::WalletImpl::setPassword ( const std::string & password)
overridevirtual

Implements Monero::Wallet.

◆ setProxy()

bool Monero::WalletImpl::setProxy ( const std::string & address)
overridevirtual

Implements Monero::Wallet.

◆ setRecoveringFromDevice()

void Monero::WalletImpl::setRecoveringFromDevice ( bool recoveringFromDevice)
overridevirtual

setRecoveringFromDevice - set state to recovering from device

Parameters
recoveringFromDevice- true/false

Implements Monero::Wallet.

◆ setRecoveringFromSeed()

void Monero::WalletImpl::setRecoveringFromSeed ( bool recoveringFromSeed)
overridevirtual

setRecoveringFromSeed - set state recover form seed

Parameters
recoveringFromSeed- true/false

Implements Monero::Wallet.

◆ setRefreshFromBlockHeight()

void Monero::WalletImpl::setRefreshFromBlockHeight ( uint64_t refresh_from_block_height)
overridevirtual

setRefreshFromBlockHeight - start refresh from block height on recover

Parameters
refresh_from_block_height- blockchain start height

Implements Monero::Wallet.

◆ setRing()

bool Monero::WalletImpl::setRing ( const std::string & key_image,
const std::vector< uint64_t > & ring,
bool relative )
overridevirtual

sets the ring used for a key image

Implements Monero::Wallet.

◆ setSeedLanguage()

void Monero::WalletImpl::setSeedLanguage ( const std::string & arg)
overridevirtual

Implements Monero::Wallet.

◆ setStatus()

void Monero::WalletImpl::setStatus ( int status,
const std::string & message ) const
private

◆ setStatusCritical()

void Monero::WalletImpl::setStatusCritical ( const std::string & message) const
private

◆ setStatusError()

void Monero::WalletImpl::setStatusError ( const std::string & message) const
private

◆ setSubaddressLabel()

void Monero::WalletImpl::setSubaddressLabel ( uint32_t accountIndex,
uint32_t addressIndex,
const std::string & label )
overridevirtual

setSubaddressLabel - sets the label of the specified subaddress

Parameters
accountIndex- the major index specifying the subaddress account
addressIndex- the minor index specifying the subaddress
label- the new label for the specified subaddress

Implements Monero::Wallet.

◆ setSubaddressLookahead()

void Monero::WalletImpl::setSubaddressLookahead ( uint32_t major,
uint32_t minor )
overridevirtual

setSubaddressLookahead - set size of subaddress lookahead

Parameters
major- size fot the major index
minor- size fot the minor index

Implements Monero::Wallet.

◆ setTrustedDaemon()

void Monero::WalletImpl::setTrustedDaemon ( bool arg)
overridevirtual

Implements Monero::Wallet.

◆ setupBackgroundSync()

bool Monero::WalletImpl::setupBackgroundSync ( const BackgroundSyncType background_sync_type,
const std::string & wallet_password,
const optional< std::string > & background_cache_password = optional< std::string >() )
overridevirtual

setupBackgroundSync - setup background sync mode with just a view key

Parameters
background_sync_type- the mode the wallet background syncs in
wallet_password
background_cache_password- custom password to encrypt background cache, only needed for custom password background sync type
Returns
- true on success

Implements Monero::Wallet.

◆ setUserNote()

bool Monero::WalletImpl::setUserNote ( const std::string & txid,
const std::string & note )
overridevirtual

setUserNote - attach an arbitrary string note to a txid

Parameters
txid- the transaction id to attach the note to
note- the note
Returns
true if successful, false otherwise

Implements Monero::Wallet.

◆ signMessage()

std::string Monero::WalletImpl::signMessage ( const std::string & message,
const std::string & address )
overridevirtual

Implements Monero::Wallet.

◆ signMultisigParticipant()

std::string Monero::WalletImpl::signMultisigParticipant ( const std::string & message) const
overridevirtual

signMultisigParticipant signs given message with the multisig public signer key

Parameters
messagemessage to sign
Returns
signature in case of success. Sets status to Error and return empty string in case of error

Implements Monero::Wallet.

◆ startBackgroundSync()

bool Monero::WalletImpl::startBackgroundSync ( )
overridevirtual

startBackgroundSync - sync the chain in the background with just view key

Implements Monero::Wallet.

◆ startRefresh()

void Monero::WalletImpl::startRefresh ( )
overridevirtual

StartRefresh - Start/resume refresh thread (refresh every 10 seconds).

Implements Monero::Wallet.

◆ status()

int Monero::WalletImpl::status ( ) const
overridevirtual

returns wallet status (Status_Ok | Status_Error)

Implements Monero::Wallet.

◆ statusWithErrorString()

void Monero::WalletImpl::statusWithErrorString ( int & status,
std::string & errorString ) const
overridevirtual

returns both error and error string atomically. suggested to use in instead of status() and errorString()

Implements Monero::Wallet.

◆ stop()

void Monero::WalletImpl::stop ( )
overridevirtual

stop - interrupts wallet refresh() loop once (doesn't stop background refresh thread)

Implements Monero::Wallet.

◆ stopBackgroundSync()

bool Monero::WalletImpl::stopBackgroundSync ( const std::string & wallet_password)
overridevirtual

stopBackgroundSync - bring back spend key and process background synced txs

Parameters
wallet_password

Implements Monero::Wallet.

◆ stopRefresh()

void Monero::WalletImpl::stopRefresh ( )
private

◆ store()

bool Monero::WalletImpl::store ( const std::string & path)
overridevirtual

store - stores wallet to file.

Parameters
path- main filename to store wallet to. additionally stores address file and keys file. to store to the same file - just pass empty string;
Returns

Implements Monero::Wallet.

◆ subaddress()

Subaddress * Monero::WalletImpl::subaddress ( )
overridevirtual

Implements Monero::Wallet.

◆ subaddressAccount()

SubaddressAccount * Monero::WalletImpl::subaddressAccount ( )
overridevirtual

Implements Monero::Wallet.

◆ submitTransaction()

bool Monero::WalletImpl::submitTransaction ( const std::string & fileName)
overridevirtual

submitTransaction - submits transaction in signed tx file

Returns
- true on success

Implements Monero::Wallet.

◆ synchronized()

bool Monero::WalletImpl::synchronized ( ) const
overridevirtual

synchronized - checks if wallet was ever synchronized

Returns

Implements Monero::Wallet.

◆ trustedDaemon()

bool Monero::WalletImpl::trustedDaemon ( ) const
overridevirtual

Implements Monero::Wallet.

◆ unblackballOutput()

bool Monero::WalletImpl::unblackballOutput ( const std::string & amount,
const std::string & offset )
overridevirtual

unblackballs an output

Implements Monero::Wallet.

◆ unlockedBalance()

uint64_t Monero::WalletImpl::unlockedBalance ( uint32_t accountIndex = 0) const
overridevirtual

Implements Monero::Wallet.

◆ unlockKeysFile()

bool Monero::WalletImpl::unlockKeysFile ( )
overridevirtual

Implements Monero::Wallet.

◆ useForkRules()

bool Monero::WalletImpl::useForkRules ( uint8_t version,
int64_t early_blocks ) const
overridevirtual

check if hard fork rules should be used

Implements Monero::Wallet.

◆ verifyMessageWithPublicKey()

bool Monero::WalletImpl::verifyMessageWithPublicKey ( const std::string & message,
const std::string & publicKey,
const std::string & signature ) const
overridevirtual

verifyMessageWithPublicKey verifies that message was signed with the given public key

Parameters
messagemessage
publicKeyhex encoded public key
signaturesignature of the message
Returns
true if the signature is correct. false and sets error state in case of error

Implements Monero::Wallet.

◆ verifySignedMessage()

bool Monero::WalletImpl::verifySignedMessage ( const std::string & message,
const std::string & addres,
const std::string & signature ) const
overridevirtual

verifySignedMessage - verify a signature matches a given message

Parameters
message- the message (arbitrary byte data)
address- the address the signature claims to be made with
signature- the signature
Returns
true if the signature verified, false otherwise

Implements Monero::Wallet.

◆ watchOnly()

bool Monero::WalletImpl::watchOnly ( ) const
overridevirtual

watchOnly - checks if wallet is watch only

Returns
- true if watch only

Implements Monero::Wallet.

◆ AddressBookImpl

friend class AddressBookImpl
friend

◆ PendingTransactionImpl

friend class PendingTransactionImpl
friend

◆ SubaddressAccountImpl

friend class SubaddressAccountImpl
friend

◆ SubaddressImpl

friend class SubaddressImpl
friend

◆ TransactionHistoryImpl

friend class TransactionHistoryImpl
friend

◆ UnsignedTransactionImpl

friend class UnsignedTransactionImpl
friend

◆ Wallet2CallbackImpl

friend struct Wallet2CallbackImpl
friend

Member Data Documentation

◆ m_addressBook

std::unique_ptr<AddressBookImpl> Monero::WalletImpl::m_addressBook
private

◆ m_daemon_login

boost::optional<epee::net_utils::http::login> Monero::WalletImpl::m_daemon_login {}
private

◆ m_errorString

std::string Monero::WalletImpl::m_errorString
mutableprivate

◆ m_history

std::unique_ptr<TransactionHistoryImpl> Monero::WalletImpl::m_history
private

◆ m_is_connected

std::atomic<bool> Monero::WalletImpl::m_is_connected
mutableprivate

◆ m_password

std::string Monero::WalletImpl::m_password
private

◆ m_rebuildWalletCache

std::atomic<bool> Monero::WalletImpl::m_rebuildWalletCache
private

◆ m_recoveringFromDevice

std::atomic<bool> Monero::WalletImpl::m_recoveringFromDevice
private

◆ m_recoveringFromSeed

std::atomic<bool> Monero::WalletImpl::m_recoveringFromSeed
private

◆ m_refreshCV

boost::condition_variable Monero::WalletImpl::m_refreshCV
private

◆ m_refreshEnabled

std::atomic<bool> Monero::WalletImpl::m_refreshEnabled
private

◆ m_refreshIntervalMillis

std::atomic<int> Monero::WalletImpl::m_refreshIntervalMillis
private

◆ m_refreshMutex

boost::mutex Monero::WalletImpl::m_refreshMutex
private

◆ m_refreshMutex2

boost::mutex Monero::WalletImpl::m_refreshMutex2
private

◆ m_refreshShouldRescan

std::atomic<bool> Monero::WalletImpl::m_refreshShouldRescan
private

◆ m_refreshThread

boost::thread Monero::WalletImpl::m_refreshThread
private

◆ m_refreshThreadDone

std::atomic<bool> Monero::WalletImpl::m_refreshThreadDone
private

◆ m_status

int Monero::WalletImpl::m_status
mutableprivate

◆ m_statusMutex

boost::mutex Monero::WalletImpl::m_statusMutex
mutableprivate

◆ m_subaddress

std::unique_ptr<SubaddressImpl> Monero::WalletImpl::m_subaddress
private

◆ m_subaddressAccount

std::unique_ptr<SubaddressAccountImpl> Monero::WalletImpl::m_subaddressAccount
private

◆ m_synchronized

std::atomic<bool> Monero::WalletImpl::m_synchronized
private

◆ m_wallet

std::unique_ptr<tools::wallet2> Monero::WalletImpl::m_wallet
private

◆ m_wallet2Callback

std::unique_ptr<Wallet2CallbackImpl> Monero::WalletImpl::m_wallet2Callback
private

The documentation for this class was generated from the following files: