mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-18 15:51:34 +02:00
ready to implement save(path, password)
This commit is contained in:
@@ -160,6 +160,7 @@ namespace monero {
|
||||
|
||||
MoneroWallet::~MoneroWallet() {
|
||||
cout << "~MoneroWallet()" << endl;
|
||||
close();
|
||||
}
|
||||
|
||||
// TODO: switch this to setDaemonConnection(MoneroDaemonRpc& daemonConnection)
|
||||
@@ -402,6 +403,21 @@ namespace monero {
|
||||
return iter == unlockedBalancePerSubaddress.end() ? 0 : iter->second.first;
|
||||
}
|
||||
|
||||
void MoneroWallet::save() {
|
||||
cout << "save()" << endl;
|
||||
save(nullptr, nullptr);
|
||||
}
|
||||
|
||||
void MoneroWallet::save(string path, string password) {
|
||||
cout << "save(" << path << ", " << password << ")" << endl;
|
||||
throw runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
void MoneroWallet::close() {
|
||||
cout << "close()" << endl;
|
||||
throw runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
// ------------------------------- PRIVATE HELPERS ----------------------------
|
||||
|
||||
MoneroSyncResult MoneroWallet::syncAux(uint64_t* startHeight, uint64_t* endHeight, MoneroSyncListener* listener) {
|
||||
|
||||
@@ -1102,6 +1102,27 @@ namespace monero {
|
||||
// */
|
||||
// public void stopMining();
|
||||
|
||||
/**
|
||||
* Re-save the wallet at its current path.
|
||||
*
|
||||
* Throws an exception if the wallet was not loaded from a path and has not
|
||||
* been saved to an explicit path.
|
||||
*/
|
||||
void save();
|
||||
|
||||
/**
|
||||
* Save the wallet at the given path.
|
||||
*
|
||||
* @param path is the path to save the wallet at
|
||||
* @param password is the password to encrypt the wallet
|
||||
*/
|
||||
void save(string path, string password);
|
||||
|
||||
/**
|
||||
* Close the wallet.
|
||||
*/
|
||||
void close();
|
||||
|
||||
// --------------------------------- PRIVATE --------------------------------
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user