diff --git a/src/utils/MoneroUtils.cpp b/src/utils/MoneroUtils.cpp index 07d8e45..6803ebf 100644 --- a/src/utils/MoneroUtils.cpp +++ b/src/utils/MoneroUtils.cpp @@ -74,13 +74,14 @@ void MoneroUtils::binaryBlocksToJson(const std::string &bin, std::string &json) json = ss.str(); } -string MoneroUtils::serialize(vector blocks) { - cout << "serialize(blocks)" << endl; - throw runtime_error("Not implemented"); +string MoneroUtils::serialize(const MoneroAccount& account) { + throw runtime_error("serialize(account) not implemented"); } -MoneroTxRequest MoneroUtils::deserialize(const string& txRequestStr) { - cout << "deserialize(txRequestStr)" << endl; - cout << txRequestStr << endl; - throw runtime_error("Not implemented"); +string MoneroUtils::serialize(const MoneroSubaddress& subaddress) { + throw runtime_error("serialize(subaddress) not implemented"); +} + +string MoneroUtils::serialize(const MoneroBlock& block) { + throw runtime_error("serialize(block) not implemented"); } diff --git a/src/utils/MoneroUtils.h b/src/utils/MoneroUtils.h index 39197ef..d161ccf 100644 --- a/src/utils/MoneroUtils.h +++ b/src/utils/MoneroUtils.h @@ -21,12 +21,22 @@ namespace MoneroUtils void binaryBlocksToJson(const std::string &bin, std::string &json); - string serialize(const vector blocks); + // TODO: template implementation here, could move to MoneroUtils.hpp per https://stackoverflow.com/questions/3040480/c-template-function-compiles-in-header-but-not-implementation + template string serialize(const vector types) { + cout << "serialize(types)" << endl; + throw runtime_error("Not implemented"); + } - MoneroTxRequest deserialize(const string& txRequestStr); + string serialize(const MoneroAccount& account); + + string serialize(const MoneroSubaddress& subaddress); + + string serialize(const MoneroBlock& block); /** * Modified from core_rpc_server.cpp to return a string. + * + * TODO: remove this duplicate, use core_rpc_server instead */ static std::string get_pruned_tx_json(cryptonote::transaction &tx) {