Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

wallet.h File Reference
#include <amount.h>
#include <base58.h>
#include <policy/feerate.h>
#include <saltedhasher.h>
#include <streams.h>
#include <tinyformat.h>
#include <ui_interface.h>
#include <util.h>
#include <utilstrencodings.h>
#include <validationinterface.h>
#include <script/ismine.h>
#include <wallet/coincontrol.h>
#include <wallet/crypter.h>
#include <wallet/walletdb.h>
#include <wallet/rpcwallet.h>
#include <privatesend/privatesend.h>
#include <algorithm>
#include <atomic>
#include <deque>
#include <map>
#include <memory>
#include <set>
#include <stdexcept>
#include <stdint.h>
#include <string>
#include <utility>
#include <vector>
+ Include dependency graph for wallet.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CompactTallyItem
 
class  CKeyPool
 A key pool entry. More...
 
class  CAddressBookData
 Address book data. More...
 
struct  CRecipient
 
struct  COutputEntry
 
class  CMerkleTx
 A transaction with a merkle branch linking it to the block chain. More...
 
class  CWalletTx
 A transaction with a bunch of additional info that only the owner cares about. More...
 
struct  WalletTxHasher
 
class  CInputCoin
 
struct  CompareInputCoinBIP69
 
class  COutput
 
class  CWalletKey
 Private key that includes an expiration date in case it never gets used. More...
 
class  CAccountingEntry
 Internal transfers. More...
 
class  CWallet
 A CWallet is an extension of a keystore, which also maintains a set of transactions and balances, and provides the ability to create new transactions. More...
 
class  CReserveKey
 A key allocated from the key pool. More...
 
class  CAccount
 Account information. More...
 
class  WalletRescanReserver
 RAII object to check and reserve a wallet rescan. More...
 

Typedefs

typedef std::map< std::string, std::string > mapValue_t
 

Enumerations

enum  WalletFeature {
  FEATURE_BASE = 10500, FEATURE_WALLETCRYPT = 40000, FEATURE_COMPRPUBKEY = 60000, FEATURE_HD = 120200,
  FEATURE_LATEST = 61000
}
 (client) version numbers for particular wallet features More...
 

Functions

bool AddWallet (CWallet *wallet)
 
bool RemoveWallet (CWallet *wallet)
 
bool HasWallets ()
 
std::vector< CWallet * > GetWallets ()
 
CWalletGetWallet (const std::string &name)
 
static void ReadOrderPos (int64_t &nOrderPos, mapValue_t &mapValue)
 
static void WriteOrderPos (const int64_t &nOrderPos, mapValue_t &mapValue)
 

Variables

CFeeRate payTxFee
 Settings. More...
 
unsigned int nTxConfirmTarget
 
bool bSpendZeroConfChange
 
static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000
 
static const CAmount DEFAULT_TRANSACTION_FEE = 0
 -paytxfee default More...
 
static const CAmount DEFAULT_FALLBACK_FEE = 1000
 -fallbackfee default More...
 
static const CAmount DEFAULT_DISCARD_FEE = 10000
 -m_discard_rate default More...
 
static const CAmount DEFAULT_TRANSACTION_MINFEE = 1000
 -mintxfee default More...
 
static const CAmount WALLET_INCREMENTAL_RELAY_FEE = 5000
 minimum recommended increment for BIP 125 replacement txs More...
 
static const CAmount MIN_CHANGE = CENT
 target minimum change amount More...
 
static const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2
 final minimum change amount after paying for fees More...
 
static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true
 Default for -spendzeroconfchange. More...
 
static const bool DEFAULT_WALLET_REJECT_LONG_CHAINS = false
 Default for -walletrejectlongchains. More...
 
static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 6
 -txconfirmtarget default More...
 
static const bool DEFAULT_WALLETBROADCAST = true
 
static const bool DEFAULT_DISABLE_WALLET = false
 
static const int64_t TIMESTAMP_MIN = 0
 
static const bool DEFAULT_USE_HD_WALLET = false
 if set, all keys will be derived by using BIP39/BIP44 More...
 

Typedef Documentation

◆ mapValue_t

typedef std::map<std::string, std::string> mapValue_t

Definition at line 174 of file wallet.h.

Enumeration Type Documentation

◆ WalletFeature

(client) version numbers for particular wallet features

Enumerator
FEATURE_BASE 
FEATURE_WALLETCRYPT 
FEATURE_COMPRPUBKEY 
FEATURE_HD 
FEATURE_LATEST 

Definition at line 95 of file wallet.h.

Function Documentation

◆ AddWallet()

bool AddWallet ( CWallet wallet)

◆ GetWallet()

CWallet* GetWallet ( const std::string &  name)

Definition at line 85 of file wallet.cpp.

References cs_wallets, LOCK, and name.

Referenced by GetWalletForJSONRPCRequest().

◆ GetWallets()

◆ HasWallets()

◆ ReadOrderPos()

static void ReadOrderPos ( int64_t &  nOrderPos,
mapValue_t mapValue 
)
inlinestatic

Definition at line 177 of file wallet.h.

References atoi64().

Referenced by CWalletTx::SerializationOp(), and CAccountingEntry::SerializationOp().

◆ RemoveWallet()

bool RemoveWallet ( CWallet wallet)

◆ WriteOrderPos()

static void WriteOrderPos ( const int64_t &  nOrderPos,
mapValue_t mapValue 
)
inlinestatic

Definition at line 188 of file wallet.h.

References i64tostr().

Referenced by CWalletTx::SerializationOp(), and CAccountingEntry::SerializationOp().

Variable Documentation

◆ bSpendZeroConfChange

bool bSpendZeroConfChange

◆ DEFAULT_DISABLE_WALLET

◆ DEFAULT_DISCARD_FEE

const CAmount DEFAULT_DISCARD_FEE = 10000
static

-m_discard_rate default

Definition at line 60 of file wallet.h.

Referenced by WalletInit::GetHelpString().

◆ DEFAULT_FALLBACK_FEE

const CAmount DEFAULT_FALLBACK_FEE = 1000
static

-fallbackfee default

Definition at line 58 of file wallet.h.

Referenced by BOOST_FIXTURE_TEST_CASE(), and WalletInit::GetHelpString().

◆ DEFAULT_KEYPOOL_SIZE

const unsigned int DEFAULT_KEYPOOL_SIZE = 1000
static

Definition at line 54 of file wallet.h.

Referenced by WalletInit::GetHelpString(), keypoolrefill(), and CWallet::TopUpKeyPool().

◆ DEFAULT_SPEND_ZEROCONF_CHANGE

const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true
static

Default for -spendzeroconfchange.

Definition at line 70 of file wallet.h.

Referenced by WalletInit::GetHelpString(), and WalletInit::ParameterInteraction().

◆ DEFAULT_TRANSACTION_FEE

const CAmount DEFAULT_TRANSACTION_FEE = 0
static

-paytxfee default

Definition at line 56 of file wallet.h.

Referenced by SendCoinsDialog::SendCoinsDialog().

◆ DEFAULT_TRANSACTION_MINFEE

const CAmount DEFAULT_TRANSACTION_MINFEE = 1000
static

-mintxfee default

Definition at line 62 of file wallet.h.

Referenced by WalletInit::GetHelpString().

◆ DEFAULT_TX_CONFIRM_TARGET

const unsigned int DEFAULT_TX_CONFIRM_TARGET = 6
static

-txconfirmtarget default

Definition at line 74 of file wallet.h.

Referenced by WalletInit::GetHelpString(), and WalletInit::ParameterInteraction().

◆ DEFAULT_USE_HD_WALLET

const bool DEFAULT_USE_HD_WALLET = false
static

if set, all keys will be derived by using BIP39/BIP44

Definition at line 81 of file wallet.h.

Referenced by CWallet::CreateWalletFromFile(), and WalletInit::GetHelpString().

◆ DEFAULT_WALLET_REJECT_LONG_CHAINS

const bool DEFAULT_WALLET_REJECT_LONG_CHAINS = false
static

Default for -walletrejectlongchains.

Definition at line 72 of file wallet.h.

Referenced by CWallet::CreateTransaction(), WalletInit::GetHelpString(), and CWallet::SelectCoins().

◆ DEFAULT_WALLETBROADCAST

const bool DEFAULT_WALLETBROADCAST = true
static

Definition at line 75 of file wallet.h.

Referenced by CWallet::CreateWalletFromFile(), and WalletInit::GetHelpString().

◆ MIN_CHANGE

const CAmount MIN_CHANGE = CENT
static

target minimum change amount

Definition at line 66 of file wallet.h.

Referenced by BOOST_AUTO_TEST_CASE(), CWallet::SelectCoinsMinConf(), and CoinControlDialog::updateLabels().

◆ MIN_FINAL_CHANGE

const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2
static

final minimum change amount after paying for fees

Definition at line 68 of file wallet.h.

◆ nTxConfirmTarget

◆ payTxFee

◆ TIMESTAMP_MIN

const int64_t TIMESTAMP_MIN = 0
static

Definition at line 78 of file wallet.h.

Referenced by importaddress(), importprivkey(), and importpubkey().

◆ WALLET_INCREMENTAL_RELAY_FEE

const CAmount WALLET_INCREMENTAL_RELAY_FEE = 5000
static

minimum recommended increment for BIP 125 replacement txs

Definition at line 64 of file wallet.h.

Released under the MIT license