PIVX Core  5.6.99
P2P Digital Currency
Classes | Public Types | Public Slots | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
WalletModel Class Reference

Interface to PIVX wallet from Qt view code. More...

#include <walletmodel.h>

Inheritance diagram for WalletModel:
[legend]
Collaboration diagram for WalletModel:
[legend]

Classes

class  ListCoinsKey
 
class  ListCoinsValue
 
struct  SendCoinsReturn
 
class  UnlockContext
 

Public Types

enum  StatusCode {
  OK , InvalidAmount , InvalidAddress , AmountExceedsBalance ,
  AmountWithFeeExceedsBalance , DuplicateAddress , TransactionCreationFailed , TransactionCheckFailed ,
  TransactionCommitFailed , StakingOnlyUnlocked , InsaneFee , CannotCreateInternalAddress
}
 
enum  EncryptionStatus { Unencrypted , Locked , Unlocked , UnlockedForStaking }
 

Public Slots

void balanceNotify ()
 
void updateTxModelData ()
 
void pollFinished ()
 
void updateStatus ()
 
void updateTransaction ()
 
void updateAddressBook (const QString &address, const QString &label, bool isMine, const QString &purpose, int status)
 
void updateWatchOnlyFlag (bool fHaveWatchonly)
 
void pollBalanceChanged ()
 
bool updateAddressBookLabels (const CWDestination &address, const std::string &strName, const std::string &strPurpose)
 

Signals

void balanceChanged (const interfaces::WalletBalances &walletBalances)
 
void encryptionStatusChanged (int status)
 
void requireUnlock ()
 
void message (const QString &title, const QString &body, unsigned int style, bool *ret=nullptr)
 
void coinsSent (CWallet *wallet, const SendCoinsRecipient &recipient, const QByteArray &transaction)
 
void showProgress (const QString &title, int nProgress)
 
void notifyWatchonlyChanged (bool fHaveWatchonly)
 
void notifyReceiveAddressChanged ()
 
void notifySSTChanged (const double sstVal)
 notify stake-split threshold changed More...
 

Public Member Functions

 WalletModel (CWallet *wallet, OptionsModel *optionsModel, QObject *parent=0)
 
 ~WalletModel ()
 
void init ()
 
OptionsModelgetOptionsModel ()
 
AddressTableModelgetAddressTableModel ()
 
TransactionTableModelgetTransactionTableModel ()
 
void resetWalletOptions (QSettings &settings)
 
bool isTestNetwork () const
 
bool isRegTestNetwork () const
 
bool isShutdownRequested ()
 
bool isColdStakingNetworkelyEnabled () const
 Whether cold staking is enabled or disabled in the network. More...
 
bool isSaplingInMaintenance () const
 
bool isV6Enforced () const
 
CAmount getMinColdStakingAmount () const
 
bool isStakingStatusActive () const
 
bool hasWallet ()
 
bool isHDEnabled () const
 
bool isSaplingWalletEnabled () const
 
bool upgradeWallet (std::string &upgradeError)
 
QString getWalletPath ()
 
interfaces::WalletBalances GetWalletBalances ()
 
CAmount getBalance (const CCoinControl *coinControl=nullptr, bool fIncludeDelegated=true, bool fUnlockedOnly=false, bool fIncludeShielded=true) const
 
CAmount getUnlockedBalance (const CCoinControl *coinControl=nullptr, bool fIncludeDelegated=true, bool fIncludeShielded=true) const
 
CAmount getLockedBalance (bool isTransparent) const
 
bool haveWatchOnly () const
 
CAmount getDelegatedBalance () const
 
bool isColdStaking () const
 
void getAvailableP2CSCoins (std::vector< COutput > &vCoins) const
 
EncryptionStatus getEncryptionStatus () const
 
bool isWalletUnlocked () const
 
bool isWalletLocked (bool fFullUnlocked=true) const
 
void emitBalanceChanged ()
 
bool validateAddress (const QString &address)
 
bool validateAddress (const QString &address, bool fStaking)
 
bool validateAddress (const QString &address, bool fStaking, bool &isShielded)
 
Optional< QString > getShieldedAddressFromSpendDesc (const uint256 &txHash, int index)
 
void setWalletDefaultFee (CAmount fee=DEFAULT_TRANSACTION_FEE)
 
bool hasWalletCustomFee ()
 
bool getWalletCustomFee (CAmount &nFeeRet)
 
void setWalletCustomFee (bool fUseCustomFee, const CAmount nFee=DEFAULT_TRANSACTION_FEE)
 
CAmount getNetMinFee ()
 
void setWalletStakeSplitThreshold (const CAmount nStakeSplitThreshold)
 
CAmount getWalletStakeSplitThreshold () const
 
double getSSTMinimum () const
 
const CWalletTxgetTx (uint256 id)
 
SendCoinsReturn prepareTransaction (WalletModelTransaction *transaction, const CCoinControl *coinControl=nullptr, bool fIncludeDelegations=true)
 
SendCoinsReturn sendCoins (WalletModelTransaction &transaction)
 
OperationResult PrepareShieldedTransaction (WalletModelTransaction *modelTransaction, bool fromTransparent, const CCoinControl *coinControl=nullptr)
 
OperationResult createAndSendProposalFeeTx (CBudgetProposal &prop)
 
bool setWalletEncrypted (bool encrypted, const SecureString &passphrase)
 
bool setWalletLocked (bool locked, const SecureString &passPhrase=SecureString(), bool stakingOnly=false)
 
bool lockForStakingOnly (const SecureString &passPhrase=SecureString())
 
bool changePassphrase (const SecureString &oldPass, const SecureString &newPass)
 
bool isStakingOnlyUnlocked ()
 
bool backupWallet (const QString &filename)
 
UnlockContext requestUnlock ()
 
bool getPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const
 
int64_t getCreationTime () const
 
int64_t getKeyCreationTime (const CPubKey &key)
 
int64_t getKeyCreationTime (const CTxDestination &address)
 
int64_t getKeyCreationTime (const std::string &address)
 
int64_t getKeyCreationTime (const libzcash::SaplingPaymentAddress &address)
 
CallResult< DestinationgetNewAddress (const std::string &label="") const
 
CallResult< DestinationgetNewStakingAddress (const std::string &label="") const
 Return a new address used to receive for delegated cold stake purpose. More...
 
CallResult< DestinationgetNewShieldedAddress (std::string strLabel="")
 Return a new shielded address. More...
 
WalletRescanReserver getRescanReserver () const
 Return new wallet rescan reserver. More...
 
bool whitelistAddressFromColdStaking (const QString &addressStr)
 
bool blacklistAddressFromColdStaking (const QString &address)
 
bool updateAddressBookPurpose (const QString &addressStr, const std::string &purpose)
 
std::string getLabelForAddress (const CTxDestination &address)
 
QString getSaplingAddressString (const CWalletTx *wtx, const SaplingOutPoint &op) const
 
bool getKeyId (const CTxDestination &address, CKeyID &keyID)
 
bool getKey (const CKeyID &keyID, CKey &key) const
 
bool haveKey (const CKeyID &keyID) const
 
bool addKeys (const CKey &key, const CPubKey &pubkey, WalletRescanReserver &reserver)
 
bool isMine (const CWDestination &address)
 
bool isMine (const QString &addressStr)
 
bool IsShieldedDestination (const CWDestination &address)
 
bool isUsed (CTxDestination address)
 
bool getMNCollateralCandidate (COutPoint &outPoint)
 
int getWalletTxDepth (const uint256 &txHash) const
 
bool isSpent (const COutPoint &outpoint) const
 
void listCoins (std::map< ListCoinsKey, std::vector< ListCoinsValue >> &mapCoins, bool fSelectTransparent) const
 
void listCoins (std::map< ListCoinsKey, std::vector< ListCoinsValue >> &mapCoins) const
 
void listAvailableNotes (std::map< ListCoinsKey, std::vector< ListCoinsValue >> &mapCoins) const
 
bool isLockedCoin (uint256 hash, unsigned int n, bool isTransparent=true) const
 
void lockCoin (uint256 hash, unsigned int n, bool isTransparent=true)
 
void unlockCoin (uint256 hash, unsigned int n, bool isTransparent=true)
 
std::set< COutPointlistLockedCoins ()
 
std::set< SaplingOutPointlistLockedNotes ()
 
void loadReceiveRequests (std::vector< std::string > &vReceiveRequests)
 
bool saveReceiveRequest (const std::string &sAddress, const int64_t nId, const std::string &sRequest)
 
ClientModelclientModel () const
 
void setClientModel (ClientModel *client_model)
 
uint256 getLastBlockProcessed () const
 
int getLastBlockProcessedNum () const
 
bool hasForceCheckBalance ()
 
void setCacheNumBlocks (int _cachedNumBlocks)
 
int getCacheNumBLocks ()
 
void setCacheBlockHash (const uint256 &_blockHash)
 
void setfForceCheckBalanceChanged (bool _fForceCheckBalanceChanged)
 
Q_INVOKABLE void checkBalanceChanged (const interfaces::WalletBalances &new_balances)
 
bool processBalanceChangeInternal ()
 
void stop ()
 

Private Member Functions

interfaces::WalletBalances getBalances ()
 
void subscribeToCoreSignals ()
 
void unsubscribeFromCoreSignals ()
 

Private Attributes

CWalletwallet {nullptr}
 
interfaces::Wallet walletWrapper
 
std::unique_ptr< interfaces::Handlerm_handler_notify_status_changed
 
std::unique_ptr< interfaces::Handlerm_handler_notify_addressbook_changed
 
std::unique_ptr< interfaces::Handlerm_handler_notify_sst_changed
 
std::unique_ptr< interfaces::Handlerm_handler_notify_transaction_changed
 
std::unique_ptr< interfaces::Handlerm_handler_show_progress
 
std::unique_ptr< interfaces::Handlerm_handler_notify_watch_only_changed
 
std::unique_ptr< interfaces::Handlerm_handler_notify_walletbacked
 
ClientModelm_client_model
 
bool fHaveWatchOnly
 
bool fForceCheckBalanceChanged
 
OptionsModeloptionsModel
 
AddressTableModeladdressTableModel
 
TransactionTableModeltransactionTableModel
 
interfaces::WalletBalances m_cached_balances
 
EncryptionStatus cachedEncryptionStatus
 
int cachedNumBlocks
 
uint256 m_cached_best_block_hash
 
QTimer * pollTimer
 
QFuture< void > pollFuture
 

Detailed Description

Interface to PIVX wallet from Qt view code.

Definition at line 108 of file walletmodel.h.

Member Enumeration Documentation

◆ EncryptionStatus

Enumerator
Unencrypted 
Locked 
Unlocked 
UnlockedForStaking 

Definition at line 133 of file walletmodel.h.

◆ StatusCode

Enumerator
OK 
InvalidAmount 
InvalidAddress 
AmountExceedsBalance 
AmountWithFeeExceedsBalance 
DuplicateAddress 
TransactionCreationFailed 
TransactionCheckFailed 
TransactionCommitFailed 
StakingOnlyUnlocked 
InsaneFee 
CannotCreateInternalAddress 

Definition at line 117 of file walletmodel.h.

Constructor & Destructor Documentation

◆ WalletModel()

WalletModel::WalletModel ( CWallet wallet,
OptionsModel optionsModel,
QObject *  parent = 0 
)
explicit

Definition at line 42 of file walletmodel.cpp.

Here is the call graph for this function:

◆ ~WalletModel()

WalletModel::~WalletModel ( )

Definition at line 64 of file walletmodel.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addKeys()

bool WalletModel::addKeys ( const CKey key,
const CPubKey pubkey,
WalletRescanReserver reserver 
)

Definition at line 437 of file walletmodel.cpp.

Here is the call graph for this function:

◆ backupWallet()

bool WalletModel::backupWallet ( const QString &  filename)

Definition at line 763 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ balanceChanged

void WalletModel::balanceChanged ( const interfaces::WalletBalances walletBalances)
signal
Here is the caller graph for this function:

◆ balanceNotify

void WalletModel::balanceNotify ( )
slot

Definition at line 311 of file walletmodel.cpp.

◆ blacklistAddressFromColdStaking()

bool WalletModel::blacklistAddressFromColdStaking ( const QString &  address)

Definition at line 981 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ changePassphrase()

bool WalletModel::changePassphrase ( const SecureString oldPass,
const SecureString newPass 
)

Definition at line 752 of file walletmodel.cpp.

Here is the call graph for this function:

◆ checkBalanceChanged()

void WalletModel::checkBalanceChanged ( const interfaces::WalletBalances new_balances)

Definition at line 303 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clientModel()

ClientModel& WalletModel::clientModel ( ) const
inline

Definition at line 352 of file walletmodel.h.

◆ coinsSent

void WalletModel::coinsSent ( CWallet wallet,
const SendCoinsRecipient recipient,
const QByteArray &  transaction 
)
signal

◆ createAndSendProposalFeeTx()

OperationResult WalletModel::createAndSendProposalFeeTx ( CBudgetProposal prop)

Definition at line 657 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emitBalanceChanged()

void WalletModel::emitBalanceChanged ( )

Definition at line 297 of file walletmodel.cpp.

Here is the call graph for this function:

◆ encryptionStatusChanged

void WalletModel::encryptionStatusChanged ( int  status)
signal
Here is the caller graph for this function:

◆ getAddressTableModel()

AddressTableModel * WalletModel::getAddressTableModel ( )

Definition at line 688 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ getAvailableP2CSCoins()

void WalletModel::getAvailableP2CSCoins ( std::vector< COutput > &  vCoins) const

Definition at line 192 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ getBalance()

CAmount WalletModel::getBalance ( const CCoinControl coinControl = nullptr,
bool  fIncludeDelegated = true,
bool  fUnlockedOnly = false,
bool  fIncludeShielded = true 
) const

Definition at line 141 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ getBalances()

interfaces::WalletBalances WalletModel::getBalances ( )
inlineprivate

Definition at line 405 of file walletmodel.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCacheNumBLocks()

int WalletModel::getCacheNumBLocks ( )
inline

Definition at line 360 of file walletmodel.h.

◆ getCreationTime()

int64_t WalletModel::getCreationTime ( ) const

Definition at line 926 of file walletmodel.cpp.

◆ getDelegatedBalance()

CAmount WalletModel::getDelegatedBalance ( ) const

Definition at line 181 of file walletmodel.cpp.

Here is the call graph for this function:

◆ getEncryptionStatus()

WalletModel::EncryptionStatus WalletModel::getEncryptionStatus ( ) const

Definition at line 698 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getKey()

bool WalletModel::getKey ( const CKeyID keyID,
CKey key 
) const
inline

Definition at line 295 of file walletmodel.h.

Here is the call graph for this function:

◆ getKeyCreationTime() [1/4]

int64_t WalletModel::getKeyCreationTime ( const CPubKey key)

Definition at line 930 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getKeyCreationTime() [2/4]

int64_t WalletModel::getKeyCreationTime ( const CTxDestination address)

Definition at line 935 of file walletmodel.cpp.

Here is the call graph for this function:

◆ getKeyCreationTime() [3/4]

int64_t WalletModel::getKeyCreationTime ( const libzcash::SaplingPaymentAddress address)

Definition at line 949 of file walletmodel.cpp.

Here is the call graph for this function:

◆ getKeyCreationTime() [4/4]

int64_t WalletModel::getKeyCreationTime ( const std::string &  address)

Definition at line 943 of file walletmodel.cpp.

Here is the call graph for this function:

◆ getKeyId()

bool WalletModel::getKeyId ( const CTxDestination address,
CKeyID keyID 
)

Definition at line 998 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLabelForAddress()

std::string WalletModel::getLabelForAddress ( const CTxDestination address)

Definition at line 1011 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLastBlockProcessed()

uint256 WalletModel::getLastBlockProcessed ( ) const

Definition at line 1199 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLastBlockProcessedNum()

int WalletModel::getLastBlockProcessedNum ( ) const

Definition at line 1204 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLockedBalance()

CAmount WalletModel::getLockedBalance ( bool  isTransparent) const

Definition at line 171 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMinColdStakingAmount()

CAmount WalletModel::getMinColdStakingAmount ( ) const

Definition at line 166 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ getMNCollateralCandidate()

bool WalletModel::getMNCollateralCandidate ( COutPoint outPoint)

Definition at line 1030 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNetMinFee()

CAmount WalletModel::getNetMinFee ( )

Definition at line 1209 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNewAddress()

CallResult< Destination > WalletModel::getNewAddress ( const std::string &  label = "") const

Definition at line 957 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNewShieldedAddress()

CallResult< Destination > WalletModel::getNewShieldedAddress ( std::string  strLabel = "")

Return a new shielded address.

Definition at line 971 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNewStakingAddress()

CallResult< Destination > WalletModel::getNewStakingAddress ( const std::string &  label = "") const

Return a new address used to receive for delegated cold stake purpose.

Definition at line 964 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOptionsModel()

OptionsModel * WalletModel::getOptionsModel ( )

Definition at line 683 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ getPubKey()

bool WalletModel::getPubKey ( const CKeyID address,
CPubKey vchPubKeyOut 
) const

Definition at line 921 of file walletmodel.cpp.

Here is the call graph for this function:

◆ getRescanReserver()

WalletRescanReserver WalletModel::getRescanReserver ( ) const
inline

Return new wallet rescan reserver.

Definition at line 287 of file walletmodel.h.

Here is the caller graph for this function:

◆ getSaplingAddressString()

QString WalletModel::getSaplingAddressString ( const CWalletTx wtx,
const SaplingOutPoint op 
) const

Definition at line 1018 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getShieldedAddressFromSpendDesc()

Optional< QString > WalletModel::getShieldedAddressFromSpendDesc ( const uint256 txHash,
int  index 
)

Definition at line 1188 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSSTMinimum()

double WalletModel::getSSTMinimum ( ) const

Definition at line 372 of file walletmodel.cpp.

◆ getTransactionTableModel()

TransactionTableModel * WalletModel::getTransactionTableModel ( )

Definition at line 693 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ getTx()

const CWalletTx * WalletModel::getTx ( uint256  id)

Definition at line 678 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getUnlockedBalance()

CAmount WalletModel::getUnlockedBalance ( const CCoinControl coinControl = nullptr,
bool  fIncludeDelegated = true,
bool  fIncludeShielded = true 
) const

Definition at line 161 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWalletBalances()

interfaces::WalletBalances WalletModel::GetWalletBalances ( )
inline

Definition at line 165 of file walletmodel.h.

Here is the caller graph for this function:

◆ getWalletCustomFee()

bool WalletModel::getWalletCustomFee ( CAmount nFeeRet)

Definition at line 340 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ getWalletPath()

QString WalletModel::getWalletPath ( )

Definition at line 136 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWalletStakeSplitThreshold()

CAmount WalletModel::getWalletStakeSplitThreshold ( ) const

Definition at line 366 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWalletTxDepth()

int WalletModel::getWalletTxDepth ( const uint256 txHash) const

Definition at line 1050 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasForceCheckBalance()

bool WalletModel::hasForceCheckBalance ( )
inline

Definition at line 358 of file walletmodel.h.

◆ hasWallet()

bool WalletModel::hasWallet ( )
inline

Definition at line 156 of file walletmodel.h.

Here is the caller graph for this function:

◆ hasWalletCustomFee()

bool WalletModel::hasWalletCustomFee ( )

Definition at line 334 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ haveKey()

bool WalletModel::haveKey ( const CKeyID keyID) const
inline

Definition at line 296 of file walletmodel.h.

Here is the call graph for this function:

◆ haveWatchOnly()

bool WalletModel::haveWatchOnly ( ) const

Definition at line 176 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ init()

void WalletModel::init ( )

Definition at line 54 of file walletmodel.cpp.

Here is the call graph for this function:

◆ isColdStaking()

bool WalletModel::isColdStaking ( ) const
Todo:
: Complete me..

Definition at line 186 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ isColdStakingNetworkelyEnabled()

bool WalletModel::isColdStakingNetworkelyEnabled ( ) const

Whether cold staking is enabled or disabled in the network.

Definition at line 91 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isHDEnabled()

bool WalletModel::isHDEnabled ( ) const

Definition at line 111 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isLockedCoin()

bool WalletModel::isLockedCoin ( uint256  hash,
unsigned int  n,
bool  isTransparent = true 
) const

Definition at line 1115 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isMine() [1/2]

bool WalletModel::isMine ( const CWDestination address)

Definition at line 1168 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isMine() [2/2]

bool WalletModel::isMine ( const QString &  addressStr)

Definition at line 1173 of file walletmodel.cpp.

Here is the call graph for this function:

◆ isRegTestNetwork()

bool WalletModel::isRegTestNetwork ( ) const

Definition at line 81 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSaplingInMaintenance()

bool WalletModel::isSaplingInMaintenance ( ) const

Definition at line 96 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSaplingWalletEnabled()

bool WalletModel::isSaplingWalletEnabled ( ) const

Definition at line 116 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsShieldedDestination()

bool WalletModel::IsShieldedDestination ( const CWDestination address)

Definition at line 1178 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ isShutdownRequested()

bool WalletModel::isShutdownRequested ( )

Definition at line 86 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSpent()

bool WalletModel::isSpent ( const COutPoint outpoint) const

Definition at line 1060 of file walletmodel.cpp.

Here is the call graph for this function:

◆ isStakingOnlyUnlocked()

bool WalletModel::isStakingOnlyUnlocked ( )

Definition at line 747 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ isStakingStatusActive()

bool WalletModel::isStakingStatusActive ( ) const

Definition at line 106 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isTestNetwork()

bool WalletModel::isTestNetwork ( ) const

Definition at line 76 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isUsed()

bool WalletModel::isUsed ( CTxDestination  address)

Definition at line 1183 of file walletmodel.cpp.

Here is the call graph for this function:

◆ isV6Enforced()

bool WalletModel::isV6Enforced ( ) const

Definition at line 101 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isWalletLocked()

bool WalletModel::isWalletLocked ( bool  fFullUnlocked = true) const

Definition at line 213 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isWalletUnlocked()

bool WalletModel::isWalletUnlocked ( ) const

Definition at line 206 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listAvailableNotes()

void WalletModel::listAvailableNotes ( std::map< ListCoinsKey, std::vector< ListCoinsValue >> &  mapCoins) const

Definition at line 1075 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listCoins() [1/2]

void WalletModel::listCoins ( std::map< ListCoinsKey, std::vector< ListCoinsValue >> &  mapCoins) const

Definition at line 1091 of file walletmodel.cpp.

Here is the call graph for this function:

◆ listCoins() [2/2]

void WalletModel::listCoins ( std::map< ListCoinsKey, std::vector< ListCoinsValue >> &  mapCoins,
bool  fSelectTransparent 
) const

Definition at line 1066 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listLockedCoins()

std::set< COutPoint > WalletModel::listLockedCoins ( )

Definition at line 1136 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listLockedNotes()

std::set< SaplingOutPoint > WalletModel::listLockedNotes ( )

Definition at line 1142 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadReceiveRequests()

void WalletModel::loadReceiveRequests ( std::vector< std::string > &  vReceiveRequests)

Definition at line 1148 of file walletmodel.cpp.

Here is the call graph for this function:

◆ lockCoin()

void WalletModel::lockCoin ( uint256  hash,
unsigned int  n,
bool  isTransparent = true 
)

Definition at line 1124 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lockForStakingOnly()

bool WalletModel::lockForStakingOnly ( const SecureString passPhrase = SecureString())

Definition at line 736 of file walletmodel.cpp.

Here is the call graph for this function:

◆ message

void WalletModel::message ( const QString &  title,
const QString &  body,
unsigned int  style,
bool *  ret = nullptr 
)
signal
Here is the caller graph for this function:

◆ notifyReceiveAddressChanged

void WalletModel::notifyReceiveAddressChanged ( )
signal
Here is the caller graph for this function:

◆ notifySSTChanged

void WalletModel::notifySSTChanged ( const double  sstVal)
signal

notify stake-split threshold changed

Here is the caller graph for this function:

◆ notifyWatchonlyChanged

void WalletModel::notifyWatchonlyChanged ( bool  fHaveWatchonly)
signal
Here is the caller graph for this function:

◆ pollBalanceChanged

void WalletModel::pollBalanceChanged ( )
slot

Definition at line 262 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ pollFinished

void WalletModel::pollFinished ( )
slot

Definition at line 316 of file walletmodel.cpp.

◆ PrepareShieldedTransaction()

OperationResult WalletModel::PrepareShieldedTransaction ( WalletModelTransaction modelTransaction,
bool  fromTransparent,
const CCoinControl coinControl = nullptr 
)

Definition at line 613 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepareTransaction()

WalletModel::SendCoinsReturn WalletModel::prepareTransaction ( WalletModelTransaction transaction,
const CCoinControl coinControl = nullptr,
bool  fIncludeDelegations = true 
)

Definition at line 455 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processBalanceChangeInternal()

bool WalletModel::processBalanceChangeInternal ( )

Definition at line 227 of file walletmodel.cpp.

Here is the call graph for this function:

◆ requestUnlock()

WalletModel::UnlockContext WalletModel::requestUnlock ( )

Definition at line 883 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ requireUnlock

void WalletModel::requireUnlock ( )
signal
Here is the caller graph for this function:

◆ resetWalletOptions()

void WalletModel::resetWalletOptions ( QSettings &  settings)

Definition at line 69 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveReceiveRequest()

bool WalletModel::saveReceiveRequest ( const std::string &  sAddress,
const int64_t  nId,
const std::string &  sRequest 
)

Definition at line 1153 of file walletmodel.cpp.

Here is the call graph for this function:

◆ sendCoins()

WalletModel::SendCoinsReturn WalletModel::sendCoins ( WalletModelTransaction transaction)

Definition at line 567 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCacheBlockHash()

void WalletModel::setCacheBlockHash ( const uint256 _blockHash)
inline

Definition at line 361 of file walletmodel.h.

Here is the caller graph for this function:

◆ setCacheNumBlocks()

void WalletModel::setCacheNumBlocks ( int  _cachedNumBlocks)
inline

Definition at line 359 of file walletmodel.h.

Here is the caller graph for this function:

◆ setClientModel()

void WalletModel::setClientModel ( ClientModel client_model)

Definition at line 1194 of file walletmodel.cpp.

◆ setfForceCheckBalanceChanged()

void WalletModel::setfForceCheckBalanceChanged ( bool  _fForceCheckBalanceChanged)
inline

Definition at line 362 of file walletmodel.h.

Here is the caller graph for this function:

◆ setWalletCustomFee()

void WalletModel::setWalletCustomFee ( bool  fUseCustomFee,
const CAmount  nFee = DEFAULT_TRANSACTION_FEE 
)

Definition at line 347 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWalletDefaultFee()

void WalletModel::setWalletDefaultFee ( CAmount  fee = DEFAULT_TRANSACTION_FEE)

Definition at line 329 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ setWalletEncrypted()

bool WalletModel::setWalletEncrypted ( bool  encrypted,
const SecureString passphrase 
)
Todo:
; not supported yet

Definition at line 713 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWalletLocked()

bool WalletModel::setWalletLocked ( bool  locked,
const SecureString passPhrase = SecureString(),
bool  stakingOnly = false 
)

Definition at line 724 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWalletStakeSplitThreshold()

void WalletModel::setWalletStakeSplitThreshold ( const CAmount  nStakeSplitThreshold)

Definition at line 361 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showProgress

void WalletModel::showProgress ( const QString &  title,
int  nProgress 
)
signal

◆ stop()

void WalletModel::stop ( )

Definition at line 321 of file walletmodel.cpp.

◆ subscribeToCoreSignals()

void WalletModel::subscribeToCoreSignals ( )
private

Definition at line 858 of file walletmodel.cpp.

Here is the call graph for this function:

◆ unlockCoin()

void WalletModel::unlockCoin ( uint256  hash,
unsigned int  n,
bool  isTransparent = true 
)

Definition at line 1130 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unsubscribeFromCoreSignals()

void WalletModel::unsubscribeFromCoreSignals ( )
private

Definition at line 870 of file walletmodel.cpp.

Here is the caller graph for this function:

◆ updateAddressBook

void WalletModel::updateAddressBook ( const QString &  address,
const QString &  label,
bool  isMine,
const QString &  purpose,
int  status 
)
slot

Definition at line 383 of file walletmodel.cpp.

Here is the call graph for this function:

◆ updateAddressBookLabels

bool WalletModel::updateAddressBookLabels ( const CWDestination address,
const std::string &  strName,
const std::string &  strPurpose 
)
slot

Definition at line 425 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateAddressBookPurpose()

bool WalletModel::updateAddressBookPurpose ( const QString &  addressStr,
const std::string &  purpose 
)

Definition at line 986 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateStatus

void WalletModel::updateStatus ( )
slot

Definition at line 197 of file walletmodel.cpp.

Here is the call graph for this function:

◆ updateTransaction

void WalletModel::updateTransaction ( )
slot

Definition at line 377 of file walletmodel.cpp.

◆ updateTxModelData

void WalletModel::updateTxModelData ( )
slot

Definition at line 290 of file walletmodel.cpp.

Here is the call graph for this function:

◆ updateWatchOnlyFlag

void WalletModel::updateWatchOnlyFlag ( bool  fHaveWatchonly)
slot

Definition at line 393 of file walletmodel.cpp.

◆ upgradeWallet()

bool WalletModel::upgradeWallet ( std::string &  upgradeError)

Definition at line 121 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateAddress() [1/3]

bool WalletModel::validateAddress ( const QString &  address)

Definition at line 399 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateAddress() [2/3]

bool WalletModel::validateAddress ( const QString &  address,
bool  fStaking 
)

Definition at line 409 of file walletmodel.cpp.

Here is the call graph for this function:

◆ validateAddress() [3/3]

bool WalletModel::validateAddress ( const QString &  address,
bool  fStaking,
bool &  isShielded 
)

Definition at line 414 of file walletmodel.cpp.

Here is the call graph for this function:

◆ whitelistAddressFromColdStaking()

bool WalletModel::whitelistAddressFromColdStaking ( const QString &  addressStr)

Definition at line 976 of file walletmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ addressTableModel

AddressTableModel* WalletModel::addressTableModel
private

Definition at line 392 of file walletmodel.h.

◆ cachedEncryptionStatus

EncryptionStatus WalletModel::cachedEncryptionStatus
private

Definition at line 398 of file walletmodel.h.

◆ cachedNumBlocks

int WalletModel::cachedNumBlocks
private

Definition at line 399 of file walletmodel.h.

◆ fForceCheckBalanceChanged

bool WalletModel::fForceCheckBalanceChanged
private

Definition at line 386 of file walletmodel.h.

◆ fHaveWatchOnly

bool WalletModel::fHaveWatchOnly
private

Definition at line 385 of file walletmodel.h.

◆ m_cached_balances

interfaces::WalletBalances WalletModel::m_cached_balances
private

Definition at line 396 of file walletmodel.h.

◆ m_cached_best_block_hash

uint256 WalletModel::m_cached_best_block_hash
private

Definition at line 400 of file walletmodel.h.

◆ m_client_model

ClientModel* WalletModel::m_client_model
private

Definition at line 383 of file walletmodel.h.

◆ m_handler_notify_addressbook_changed

std::unique_ptr<interfaces::Handler> WalletModel::m_handler_notify_addressbook_changed
private

Definition at line 377 of file walletmodel.h.

◆ m_handler_notify_sst_changed

std::unique_ptr<interfaces::Handler> WalletModel::m_handler_notify_sst_changed
private

Definition at line 378 of file walletmodel.h.

◆ m_handler_notify_status_changed

std::unique_ptr<interfaces::Handler> WalletModel::m_handler_notify_status_changed
private

Definition at line 376 of file walletmodel.h.

◆ m_handler_notify_transaction_changed

std::unique_ptr<interfaces::Handler> WalletModel::m_handler_notify_transaction_changed
private

Definition at line 379 of file walletmodel.h.

◆ m_handler_notify_walletbacked

std::unique_ptr<interfaces::Handler> WalletModel::m_handler_notify_walletbacked
private

Definition at line 382 of file walletmodel.h.

◆ m_handler_notify_watch_only_changed

std::unique_ptr<interfaces::Handler> WalletModel::m_handler_notify_watch_only_changed
private

Definition at line 381 of file walletmodel.h.

◆ m_handler_show_progress

std::unique_ptr<interfaces::Handler> WalletModel::m_handler_show_progress
private

Definition at line 380 of file walletmodel.h.

◆ optionsModel

OptionsModel* WalletModel::optionsModel
private

Definition at line 390 of file walletmodel.h.

◆ pollFuture

QFuture<void> WalletModel::pollFuture
private

Definition at line 403 of file walletmodel.h.

◆ pollTimer

QTimer* WalletModel::pollTimer
private

Definition at line 402 of file walletmodel.h.

◆ transactionTableModel

TransactionTableModel* WalletModel::transactionTableModel
private

Definition at line 393 of file walletmodel.h.

◆ wallet

CWallet* WalletModel::wallet {nullptr}
private

Definition at line 369 of file walletmodel.h.

◆ walletWrapper

interfaces::Wallet WalletModel::walletWrapper
private
Todo:
: Goal would be to move every CWallet* call to the wallet wrapper and

Definition at line 373 of file walletmodel.h.


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