diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-11-18 16:55:54 +0100 |
---|---|---|
committer | Cozz Lovan <cozzlovan@yahoo.com> | 2014-01-19 18:21:54 +0100 |
commit | b10e147096b0e27fdff8c22029bc8b7a1a14f042 (patch) | |
tree | deb52bf797444b448e79df495d4a98906407af44 /src/wallet.h | |
parent | dd7c1cf534b760e9da55c225d6bb05f2bdb8e2e7 (diff) |
wallet: add interface for storing generic data on destinations
Diffstat (limited to 'src/wallet.h')
-rw-r--r-- | src/wallet.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wallet.h b/src/wallet.h index e4452a3093..dc8c007ac8 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -83,6 +83,9 @@ public: { purpose = "unknown"; } + + typedef std::map<std::string, std::string> StringMap; + StringMap destdata; }; /** A CWallet is an extension of a keystore, which also maintains a set of transactions and balances, @@ -189,6 +192,15 @@ public: bool AddCScript(const CScript& redeemScript); bool LoadCScript(const CScript& redeemScript) { return CCryptoKeyStore::AddCScript(redeemScript); } + /// Adds a destination data tuple to the store, and saves it to disk + bool AddDestData(const CTxDestination &dest, const std::string &key, const std::string &value); + /// Erases a destination data tuple in the store and on disk + bool EraseDestData(const CTxDestination &dest, const std::string &key); + /// Adds a destination data tuple to the store, without saving it to disk + bool LoadDestData(const CTxDestination &dest, const std::string &key, const std::string &value); + /// Look up a destination data tuple in the store, return true if found false otherwise + bool GetDestData(const CTxDestination &dest, const std::string &key, std::string *value) const; + bool Unlock(const SecureString& strWalletPassphrase); bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase); bool EncryptWallet(const SecureString& strWalletPassphrase); |