mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-18 07:41:32 +02:00
defined serialize utils
This commit is contained in:
@@ -74,13 +74,14 @@ void MoneroUtils::binaryBlocksToJson(const std::string &bin, std::string &json)
|
||||
json = ss.str();
|
||||
}
|
||||
|
||||
string MoneroUtils::serialize(vector<MoneroBlock> 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");
|
||||
}
|
||||
|
||||
+12
-2
@@ -21,12 +21,22 @@ namespace MoneroUtils
|
||||
|
||||
void binaryBlocksToJson(const std::string &bin, std::string &json);
|
||||
|
||||
string serialize(const vector<MoneroBlock> 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 <class T> string serialize(const vector<T> 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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user