X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fwallet.h;h=aa2194411e8f878625a3f3cea768c2f16531efe2;hb=75744e6526193604bfbcc6be3a3793315556f12c;hp=20abe44563431be0904c665c3945b39e9341dc7e;hpb=7f70ddc68f4afa4a87a15e620ba519afbc5c8b15;p=novacoin.git diff --git a/src/wallet.h b/src/wallet.h index 20abe44..aa21944 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -17,6 +17,7 @@ #include "ui_interface.h" #include "util.h" #include "walletdb.h" +#include "base58.h" extern unsigned int nStakeMaxAge; extern bool fWalletUnlockMintOnly; @@ -161,12 +162,14 @@ public: bool LoadMalleableKeyMetadata(const CMalleableKeyView &keyView, const CKeyMetadata &metadata); // Load malleable key without saving it to disk (used by LoadWallet) - bool LoadMalleableKey(const CMalleableKey &mKey) { return CCryptoKeyStore::AddMalleableKey(mKey); } + bool LoadMalleableKey(const CMalleableKeyView &keyView, const CSecret &vchSecretH) { return CCryptoKeyStore::AddMalleableKey(keyView, vchSecretH); } + bool LoadCryptedMalleableKey(const CMalleableKeyView &keyView, const std::vector &vchCryptedSecretH) { return CCryptoKeyStore::AddCryptedMalleableKey(keyView, vchCryptedSecretH); } bool LoadMinVersion(int nVersion) { nWalletVersion = nVersion; nWalletMaxVersion = std::max(nWalletMaxVersion, nVersion); return true; } // Adds an encrypted key to the store, and saves it to disk. bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret); + bool AddCryptedMalleableKey(const CMalleableKeyView& keyView, const std::vector &vchCryptedSecretH); // Adds an encrypted key to the store, without saving it to disk (used by LoadWallet) bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret) { SetMinVersion(FEATURE_WALLETCRYPT); return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret); } bool AddCScript(const CScript& redeemScript); @@ -229,7 +232,6 @@ public: bool MergeCoins(const int64_t& nAmount, const int64_t& nMinValue, const int64_t& nMaxValue, std::list& listMerged); std::string SendMoney(CScript scriptPubKey, int64_t nValue, CWalletTx& wtxNew, bool fAskFee=false); - std::string SendMoneyToDestination(const CTxDestination &address, int64_t nValue, CWalletTx& wtxNew, bool fAskFee=false); bool NewKeyPool(unsigned int nSize = 0); bool TopUpKeyPool(unsigned int nSize = 0); @@ -338,6 +340,8 @@ public: bool GetTransaction(const uint256 &hashTx, CWalletTx& wtx); + bool ExtractAddress(const CScript& scriptPubKey, CBitcoinAddress& addressRet); + bool SetDefaultKey(const CPubKey &vchPubKey); // signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVersion if those are lower