Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <hdchain.h>
Public Member Functions | |
CHDChain () | |
CHDChain (const CHDChain &other) | |
template<typename Stream , typename Operation > | |
void | SerializationOp (Stream &s, Operation ser_action) |
void | swap (CHDChain &first, CHDChain &second) |
CHDChain & | operator= (CHDChain from) |
bool | SetNull () |
bool | IsNull () const |
void | SetCrypted (bool fCryptedIn) |
bool | IsCrypted () const |
void | Debug (const std::string &strName) const |
bool | SetMnemonic (const SecureVector &vchMnemonic, const SecureVector &vchMnemonicPassphrase, bool fUpdateID) |
bool | SetMnemonic (const SecureString &ssMnemonic, const SecureString &ssMnemonicPassphrase, bool fUpdateID) |
bool | GetMnemonic (SecureVector &vchMnemonicRet, SecureVector &vchMnemonicPassphraseRet) const |
bool | GetMnemonic (SecureString &ssMnemonicRet, SecureString &ssMnemonicPassphraseRet) const |
bool | SetSeed (const SecureVector &vchSeedIn, bool fUpdateID) |
SecureVector | GetSeed () const |
uint256 | GetID () const |
uint256 | GetSeedHash () |
void | DeriveChildExtKey (uint32_t nAccountIndex, bool fInternal, uint32_t nChildIndex, CExtKey &extKeyRet) |
void | AddAccount () |
bool | GetAccount (uint32_t nAccountIndex, CHDAccount &hdAccountRet) |
bool | SetAccount (uint32_t nAccountIndex, const CHDAccount &hdAccount) |
size_t | CountAccounts () |
Public Attributes | |
ADD_SERIALIZE_METHODS | |
Private Attributes | |
int | nVersion |
uint256 | id |
bool | fCrypted |
SecureVector | vchSeed |
SecureVector | vchMnemonic |
SecureVector | vchMnemonicPassphrase |
std::map< uint32_t, CHDAccount > | mapAccounts |
CCriticalSection | cs_accounts |
Static Private Attributes | |
static const int | CURRENT_VERSION = 1 |
Detailed Description
Constructor & Destructor Documentation
◆ CHDChain() [1/2]
◆ CHDChain() [2/2]
Member Function Documentation
◆ AddAccount()
void CHDChain::AddAccount | ( | ) |
Definition at line 178 of file hdchain.cpp.
References cs_accounts, LOCK, and mapAccounts.
◆ CountAccounts()
size_t CHDChain::CountAccounts | ( | ) |
Definition at line 203 of file hdchain.cpp.
References cs_accounts, LOCK, and mapAccounts.
Referenced by dumpwallet(), and getwalletinfo().
◆ Debug()
void CHDChain::Debug | ( | const std::string & | strName | ) | const |
Definition at line 42 of file hdchain.cpp.
References DBG, fCrypted, HexStr(), CExtKey::Neuter(), CBitcoinExtKeyBase< K, Size, Type >::SetKey(), CExtKey::SetMaster(), CBase58Data::ToString(), vchMnemonic, vchMnemonicPassphrase, and vchSeed.
Referenced by CCryptoKeyStore::DecryptHDChain(), CCryptoKeyStore::EncryptHDChain(), and CWallet::GenerateNewHDChain().
◆ DeriveChildExtKey()
void CHDChain::DeriveChildExtKey | ( | uint32_t | nAccountIndex, |
bool | fInternal, | ||
uint32_t | nChildIndex, | ||
CExtKey & | extKeyRet | ||
) |
Definition at line 151 of file hdchain.cpp.
References CExtKey::Derive(), Params(), CExtKey::SetMaster(), and vchSeed.
Referenced by CWallet::DeriveNewChildKey(), and CWallet::GetKey().
◆ GetAccount()
bool CHDChain::GetAccount | ( | uint32_t | nAccountIndex, |
CHDAccount & | hdAccountRet | ||
) |
Definition at line 184 of file hdchain.cpp.
References cs_accounts, LOCK, and mapAccounts.
Referenced by CWallet::DeriveNewChildKey(), dumpwallet(), and getwalletinfo().
◆ GetID()
|
inline |
Definition at line 110 of file hdchain.h.
References id.
Referenced by CWallet::AddHDPubKey(), CCryptoKeyStore::DecryptHDChain(), CWallet::DeriveNewChildKey(), CCryptoKeyStore::EncryptHDChain(), CWallet::EncryptWallet(), CWallet::GetDecryptedHDChain(), CWallet::GetKey(), getwalletinfo(), CCryptoKeyStore::Unlock(), and validateaddress().
◆ GetMnemonic() [1/2]
bool CHDChain::GetMnemonic | ( | SecureVector & | vchMnemonicRet, |
SecureVector & | vchMnemonicPassphraseRet | ||
) | const |
Definition at line 107 of file hdchain.cpp.
References vchMnemonic, and vchMnemonicPassphrase.
Referenced by CCryptoKeyStore::DecryptHDChain(), dumphdinfo(), dumpwallet(), and CCryptoKeyStore::EncryptHDChain().
◆ GetMnemonic() [2/2]
bool CHDChain::GetMnemonic | ( | SecureString & | ssMnemonicRet, |
SecureString & | ssMnemonicPassphraseRet | ||
) | const |
Definition at line 118 of file hdchain.cpp.
References vchMnemonic, and vchMnemonicPassphrase.
◆ GetSeed()
SecureVector CHDChain::GetSeed | ( | ) | const |
Definition at line 141 of file hdchain.cpp.
References vchSeed.
Referenced by CCryptoKeyStore::DecryptHDChain(), dumphdinfo(), dumpwallet(), CCryptoKeyStore::EncryptHDChain(), and CWallet::EncryptWallet().
◆ GetSeedHash()
uint256 CHDChain::GetSeedHash | ( | ) |
Definition at line 146 of file hdchain.cpp.
References Hash(), and vchSeed.
Referenced by CCryptoKeyStore::DecryptHDChain(), CWallet::DeriveNewChildKey(), CCryptoKeyStore::EncryptHDChain(), CWallet::EncryptWallet(), CWallet::GetDecryptedHDChain(), CWallet::GetKey(), SetMnemonic(), SetSeed(), and CCryptoKeyStore::Unlock().
◆ IsCrypted()
bool CHDChain::IsCrypted | ( | ) | const |
Definition at line 37 of file hdchain.cpp.
References fCrypted.
Referenced by CCryptoKeyStore::DecryptHDChain(), CCryptoKeyStore::EncryptHDChain(), CCryptoKeyStore::SetCryptedHDChain(), and CCryptoKeyStore::SetHDChain().
◆ IsNull()
bool CHDChain::IsNull | ( | ) | const |
Definition at line 27 of file hdchain.cpp.
References vchSeed.
Referenced by CCryptoKeyStore::DecryptHDChain(), CCryptoKeyStore::EncryptHDChain(), CWallet::EncryptWallet(), CBasicKeyStore::GetHDChain(), CCryptoKeyStore::GetHDChain(), SetMnemonic(), SetNull(), SetSeed(), and CCryptoKeyStore::Unlock().
◆ operator=()
◆ SerializationOp()
|
inline |
Definition at line 61 of file hdchain.h.
References cs_accounts, fCrypted, LOCK, mapAccounts, READWRITE, vchMnemonic, vchMnemonicPassphrase, and vchSeed.
◆ SetAccount()
bool CHDChain::SetAccount | ( | uint32_t | nAccountIndex, |
const CHDAccount & | hdAccount | ||
) |
Definition at line 193 of file hdchain.cpp.
References cs_accounts, LOCK, and mapAccounts.
Referenced by CWallet::DeriveNewChildKey().
◆ SetCrypted()
void CHDChain::SetCrypted | ( | bool | fCryptedIn | ) |
Definition at line 32 of file hdchain.cpp.
References fCrypted.
Referenced by CCryptoKeyStore::DecryptHDChain(), and CCryptoKeyStore::EncryptHDChain().
◆ SetMnemonic() [1/2]
bool CHDChain::SetMnemonic | ( | const SecureVector & | vchMnemonic, |
const SecureVector & | vchMnemonicPassphrase, | ||
bool | fUpdateID | ||
) |
Definition at line 72 of file hdchain.cpp.
References vchMnemonic, and vchMnemonicPassphrase.
Referenced by CCryptoKeyStore::DecryptHDChain(), CCryptoKeyStore::EncryptHDChain(), and CWallet::GenerateNewHDChain().
◆ SetMnemonic() [2/2]
bool CHDChain::SetMnemonic | ( | const SecureString & | ssMnemonic, |
const SecureString & | ssMnemonicPassphrase, | ||
bool | fUpdateID | ||
) |
Definition at line 77 of file hdchain.cpp.
References CMnemonic::Check(), CMnemonic::Generate(), GetSeedHash(), IsNull(), CMnemonic::ToSeed(), vchMnemonic, vchMnemonicPassphrase, and vchSeed.
◆ SetNull()
bool CHDChain::SetNull | ( | ) |
Definition at line 12 of file hdchain.cpp.
References cs_accounts, CURRENT_VERSION, fCrypted, IsNull(), LOCK, mapAccounts, nVersion, vchMnemonic, vchMnemonicPassphrase, and vchSeed.
Referenced by CHDChain(), and CCryptoKeyStore::EncryptHDChain().
◆ SetSeed()
bool CHDChain::SetSeed | ( | const SecureVector & | vchSeedIn, |
bool | fUpdateID | ||
) |
Definition at line 130 of file hdchain.cpp.
References GetSeedHash(), IsNull(), and vchSeed.
Referenced by CCryptoKeyStore::DecryptHDChain(), CCryptoKeyStore::EncryptHDChain(), and CWallet::GenerateNewHDChain().
◆ swap()
Definition at line 73 of file hdchain.h.
References fCrypted, id, mapAccounts, nVersion, vchMnemonic, vchMnemonicPassphrase, and vchSeed.
Referenced by operator=().
Member Data Documentation
◆ ADD_SERIALIZE_METHODS
◆ cs_accounts
|
mutableprivate |
Definition at line 44 of file hdchain.h.
Referenced by AddAccount(), CountAccounts(), GetAccount(), SerializationOp(), SetAccount(), and SetNull().
◆ CURRENT_VERSION
|
staticprivate |
◆ fCrypted
|
private |
Definition at line 36 of file hdchain.h.
Referenced by Debug(), IsCrypted(), SerializationOp(), SetCrypted(), SetNull(), and swap().
◆ id
|
private |
◆ mapAccounts
|
private |
Definition at line 42 of file hdchain.h.
Referenced by AddAccount(), CountAccounts(), GetAccount(), SerializationOp(), SetAccount(), SetNull(), and swap().
◆ nVersion
|
private |
◆ vchMnemonic
|
private |
Definition at line 39 of file hdchain.h.
Referenced by Debug(), GetMnemonic(), SerializationOp(), SetMnemonic(), SetNull(), and swap().
◆ vchMnemonicPassphrase
|
private |
Definition at line 40 of file hdchain.h.
Referenced by Debug(), GetMnemonic(), SerializationOp(), SetMnemonic(), SetNull(), and swap().
◆ vchSeed
|
private |
Definition at line 38 of file hdchain.h.
Referenced by Debug(), DeriveChildExtKey(), GetSeed(), GetSeedHash(), IsNull(), SerializationOp(), SetMnemonic(), SetNull(), SetSeed(), and swap().
The documentation for this class was generated from the following files:
- src/hdchain.h
- src/hdchain.cpp