Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

#include <hdchain.h>

+ Collaboration diagram for CHDChain:

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)
 
CHDChainoperator= (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, CHDAccountmapAccounts
 
CCriticalSection cs_accounts
 

Static Private Attributes

static const int CURRENT_VERSION = 1
 

Detailed Description

Definition at line 28 of file hdchain.h.

Constructor & Destructor Documentation

◆ CHDChain() [1/2]

CHDChain::CHDChain ( )
inline

Definition at line 48 of file hdchain.h.

References SetNull().

◆ CHDChain() [2/2]

CHDChain::CHDChain ( const CHDChain other)
inline

Definition at line 49 of file hdchain.h.

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()

◆ 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()

◆ GetMnemonic() [1/2]

bool CHDChain::GetMnemonic ( SecureVector vchMnemonicRet,
SecureVector vchMnemonicPassphraseRet 
) const

◆ 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

◆ GetSeedHash()

◆ IsCrypted()

bool CHDChain::IsCrypted ( ) const

◆ IsNull()

◆ operator=()

CHDChain& CHDChain::operator= ( CHDChain  from)
inline

Definition at line 88 of file hdchain.h.

References swap().

◆ SerializationOp()

template<typename Stream , typename Operation >
void CHDChain::SerializationOp ( Stream &  s,
Operation  ser_action 
)
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 
)

◆ SetMnemonic() [2/2]

bool CHDChain::SetMnemonic ( const SecureString ssMnemonic,
const SecureString ssMnemonicPassphrase,
bool  fUpdateID 
)

◆ SetNull()

bool CHDChain::SetNull ( )

◆ SetSeed()

bool CHDChain::SetSeed ( const SecureVector vchSeedIn,
bool  fUpdateID 
)

◆ swap()

void CHDChain::swap ( CHDChain first,
CHDChain second 
)
inline

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

CHDChain::ADD_SERIALIZE_METHODS

Definition at line 59 of file hdchain.h.

◆ cs_accounts

CCriticalSection CHDChain::cs_accounts
mutableprivate

Definition at line 44 of file hdchain.h.

Referenced by AddAccount(), CountAccounts(), GetAccount(), SerializationOp(), SetAccount(), and SetNull().

◆ CURRENT_VERSION

const int CHDChain::CURRENT_VERSION = 1
staticprivate

Definition at line 31 of file hdchain.h.

Referenced by SetNull().

◆ fCrypted

bool CHDChain::fCrypted
private

Definition at line 36 of file hdchain.h.

Referenced by Debug(), IsCrypted(), SerializationOp(), SetCrypted(), SetNull(), and swap().

◆ id

uint256 CHDChain::id
private

Definition at line 34 of file hdchain.h.

Referenced by GetID(), and swap().

◆ mapAccounts

std::map<uint32_t, CHDAccount> CHDChain::mapAccounts
private

Definition at line 42 of file hdchain.h.

Referenced by AddAccount(), CountAccounts(), GetAccount(), SerializationOp(), SetAccount(), SetNull(), and swap().

◆ nVersion

int CHDChain::nVersion
private

Definition at line 32 of file hdchain.h.

Referenced by SetNull(), and swap().

◆ vchMnemonic

SecureVector CHDChain::vchMnemonic
private

Definition at line 39 of file hdchain.h.

Referenced by Debug(), GetMnemonic(), SerializationOp(), SetMnemonic(), SetNull(), and swap().

◆ vchMnemonicPassphrase

SecureVector CHDChain::vchMnemonicPassphrase
private

Definition at line 40 of file hdchain.h.

Referenced by Debug(), GetMnemonic(), SerializationOp(), SetMnemonic(), SetNull(), and swap().

◆ vchSeed

SecureVector CHDChain::vchSeed
private

The documentation for this class was generated from the following files:
Released under the MIT license