6 #ifndef ANONCOIN_WALLETDB_H
7 #define ANONCOIN_WALLETDB_H
55 nCreateTime = nCreateTime_;
76 CWalletDB(std::string strFilename,
const char* pszMode=
"r+") :
CDB(strFilename.c_str(), pszMode)
83 bool WriteName(
const std::string& strAddress,
const std::string& strName);
84 bool EraseName(
const std::string& strAddress);
86 bool WritePurpose(
const std::string& strAddress,
const std::string& purpose);
118 bool WriteDestData(
const std::string &address,
const std::string &key,
const std::string &value);
120 bool EraseDestData(
const std::string &address,
const std::string &key);
132 static bool Recover(
CDBEnv& dbenv, std::string filename,
bool fOnlyKeys);
138 #endif // ANONCOIN_WALLETDB_H
bool WriteMinVersion(int nVersion)
DBErrors FindWalletTx(CWallet *pwallet, std::vector< uint256 > &vTxHash)
bool WriteAccount(const std::string &strAccount, const CAccount &account)
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
bool BackupWallet(const CWallet &wallet, const std::string &strDest)
CWalletDB(std::string strFilename, const char *pszMode="r+")
bool WriteMasterKey(unsigned int nID, const CMasterKey &kMasterKey)
bool WriteCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret, const CKeyMetadata &keyMeta)
Master key for wallet encryption.
void ListAccountCreditDebit(const std::string &strAccount, std::list< CAccountingEntry > &acentries)
bool WriteWatchOnly(const CScript &script)
bool ErasePurpose(const std::string &strAddress)
bool WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccountingEntry &acentry)
DBErrors
Error statuses for the wallet database.
bool WriteOrderPosNext(int64_t nOrderPosNext)
void operator=(const CWalletDB &)
bool EraseTx(uint256 hash)
std::vector< unsigned char, secure_allocator< unsigned char > > CPrivKey
DBErrors ZapWalletTx(CWallet *pwallet)
bool EraseDestData(const std::string &address, const std::string &key)
Erase destination data tuple from wallet database.
bool WritePool(int64_t nPool, const CKeyPool &keypool)
int64_t GetAccountCreditDebit(const std::string &strAccount)
bool WriteName(const std::string &strAddress, const std::string &strName)
DBErrors LoadWallet(CWallet *pwallet)
An encapsulated public key.
bool WriteDestData(const std::string &address, const std::string &key, const std::string &value)
Write destination data key,value tuple to database.
RAII class that provides access to a Berkeley database.
bool ErasePool(int64_t nPool)
bool EraseWatchOnly(const CScript &script)
bool WriteTx(uint256 hash, const CWalletTx &wtx)
Access to the wallet database (wallet.dat)
A transaction with a bunch of additional info that only the owner cares about.
DBErrors ReorderTransactions(CWallet *)
bool ReadBestBlock(CBlockLocator &locator)
bool WriteDefaultKey(const CPubKey &vchPubKey)
bool WriteBestBlock(const CBlockLocator &locator)
bool ReadPool(int64_t nPool, CKeyPool &keypool)
Serialized script, used inside transaction inputs and outputs.
static bool Recover(CDBEnv &dbenv, std::string filename, bool fOnlyKeys)
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
bool EraseName(const std::string &strAddress)
bool WriteCScript(const uint160 &hash, const CScript &redeemScript)
bool WritePurpose(const std::string &strAddress, const std::string &purpose)
bool ReadAccount(const std::string &strAccount, CAccount &account)
bool WriteKey(const CPubKey &vchPubKey, const CPrivKey &vchPrivKey, const CKeyMetadata &keyMeta)