diff --git a/src/wallet/MoneroWallet.cpp b/src/wallet/MoneroWallet.cpp index f9326f7..dd464f2 100644 --- a/src/wallet/MoneroWallet.cpp +++ b/src/wallet/MoneroWallet.cpp @@ -1600,6 +1600,14 @@ namespace monero { return wallet2->import_outputs_from_str(blob); } + void MoneroWallet::setAttribute(const string& key, const string& val) { + wallet2->set_attribute(key, val); + } + + string MoneroWallet::getAttribute(const string& key) const { + return wallet2->get_attribute(key); + } + void MoneroWallet::startMining(boost::optional numThreads, boost::optional backgroundMining, boost::optional ignoreBattery) { cout << "startMining" << endl; diff --git a/src/wallet/MoneroWallet.h b/src/wallet/MoneroWallet.h index ce0802d..d26024f 100644 --- a/src/wallet/MoneroWallet.h +++ b/src/wallet/MoneroWallet.h @@ -1014,21 +1014,21 @@ namespace monero { */ int importOutputsHex(const string& outputsHex); -// /** -// * Set an arbitrary attribute. -// * -// * @param key is the attribute key -// * @param val is the attribute value -// */ -// public void setAttribute(string key, string val); -// -// /** -// * Get an attribute. -// * -// * @param key is the attribute to get the value of -// * @return the attribute's value -// */ -// public string getAttribute(string key); + /** + * Set an arbitrary attribute. + * + * @param key is the attribute key + * @param val is the attribute value + */ + void setAttribute(const string& key, const string& val); + + /** + * Get an attribute. + * + * @param key is the attribute to get the value of + * @return the attribute's value + */ + string getAttribute(const string& key) const; /** * Start mining.