mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-22 01:28:44 +02:00
defined MoneroOutputWallet;
MoneroUtils::deserialize() takes param to deserialize to
This commit is contained in:
@@ -86,14 +86,22 @@ string MoneroUtils::serialize(const MoneroBlock& block) {
|
||||
throw runtime_error("serialize(block) not implemented");
|
||||
}
|
||||
|
||||
MoneroTx MoneroUtils::deserializeTx(const string& txStr) {
|
||||
void MoneroUtils::deserializeTx(const string& txStr, MoneroTx& tx) {
|
||||
throw runtime_error("deserializeTx(txStr) not implemented");
|
||||
}
|
||||
|
||||
void MoneroUtils::deserializeTxWallet(const string& txStr, MoneroTxWallet& tx) {
|
||||
throw runtime_error("deserializeTxWallet(txStr) not implemented");
|
||||
}
|
||||
|
||||
MoneroTxWallet MoneroUtils::deserializeTxWallet(const string& txStr) {
|
||||
throw runtime_error("deserializeTxWallet(txStr) not implemented");
|
||||
}
|
||||
|
||||
MoneroTxRequest MoneroUtils::deserializeTxRequest(const string& txRequestStr) {
|
||||
void MoneroUtils::deserializeTxRequest(const string& txRequestStr, MoneroTxRequest& request) {
|
||||
throw runtime_error("deserializeTxRequest(txRequestStr) not implemented");
|
||||
}
|
||||
|
||||
void MoneroUtils::deserializeOutput(const string& outputStr, MoneroOutput& output) {
|
||||
throw runtime_error("deserializeOutput(outputStr) not implemented");
|
||||
}
|
||||
|
||||
void MoneroUtils::deserializeOutputWallet(const string& outputStr, MoneroOutputWallet& output) {
|
||||
throw runtime_error("deserializeOutputWallet(outputStr) not implemented");
|
||||
}
|
||||
|
||||
@@ -33,11 +33,15 @@ namespace MoneroUtils
|
||||
|
||||
string serialize(const MoneroBlock& block);
|
||||
|
||||
MoneroTx deserializeTx(const string& txStr);
|
||||
void deserializeTx(const string& txStr, MoneroTx& tx);
|
||||
|
||||
MoneroTxWallet deserializeTxWallet(const string& txStr);
|
||||
void deserializeTxWallet(const string& txStr, MoneroTxWallet& tx);
|
||||
|
||||
MoneroTxRequest deserializeTxRequest(const string& txRequestStr);
|
||||
void deserializeTxRequest(const string& txRequestStr, MoneroTxRequest& request);
|
||||
|
||||
void deserializeOutput(const string& outputStr, MoneroOutput& output);
|
||||
|
||||
void deserializeOutputWallet(const string& outputStr, MoneroOutputWallet& output);
|
||||
|
||||
/**
|
||||
* Modified from core_rpc_server.cpp to return a string.
|
||||
|
||||
@@ -90,10 +90,22 @@ namespace monero {
|
||||
vector<MoneroDestination> destinations;
|
||||
};
|
||||
|
||||
/**
|
||||
* Models a Monero output with wallet extensions.
|
||||
*/
|
||||
struct MoneroOutputWallet : public MoneroOutput {
|
||||
shared_ptr<uint32_t> accountIndex;
|
||||
shared_ptr<uint32_t> subaddressIndex;
|
||||
shared_ptr<bool> isSpent;
|
||||
shared_ptr<bool> isUnlocked;
|
||||
shared_ptr<bool> isFrozen;
|
||||
};
|
||||
|
||||
/**
|
||||
* Models a Monero transaction in the context of a wallet.
|
||||
*/
|
||||
struct MoneroTxWallet : public MoneroTx {
|
||||
vector<MoneroOutputWallet> vouts; // TODO: override vouts with different type?
|
||||
vector<MoneroIncomingTransfer> incomingTransfers;
|
||||
shared_ptr<MoneroOutgoingTransfer> outgoingTransfer;
|
||||
shared_ptr<uint32_t> numSuggestedConfirmations;
|
||||
|
||||
Reference in New Issue
Block a user