mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-18 23:58:59 +02:00
add monero_version daemon model and wallet get_version() w/o impl
This commit is contained in:
@@ -84,6 +84,15 @@ namespace monero {
|
||||
return monero_utils::serialize(to_property_tree());
|
||||
}
|
||||
|
||||
// ----------------------------- MONERO VERSION -----------------------------
|
||||
|
||||
boost::property_tree::ptree monero_version::to_property_tree() const {
|
||||
boost::property_tree::ptree node;
|
||||
if (m_version_number != boost::none) node.put("versionNumber", *m_version_number);
|
||||
if (m_is_release != boost::none) node.put("isRelease", *m_is_release);
|
||||
return node;
|
||||
}
|
||||
|
||||
// ------------------------- MONERO BLOCK HEADER ----------------------------
|
||||
|
||||
boost::property_tree::ptree monero_block_header::to_property_tree() const {
|
||||
|
||||
@@ -91,6 +91,15 @@ namespace monero {
|
||||
STAGENET
|
||||
};
|
||||
|
||||
/**
|
||||
* Models a Monero version.
|
||||
*/
|
||||
struct monero_version : public serializable_struct {
|
||||
boost::optional<uint32_t> m_version_number;
|
||||
boost::optional<bool> m_is_release;
|
||||
boost::property_tree::ptree to_property_tree() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* Models a connection to a daemon.
|
||||
*
|
||||
|
||||
@@ -981,6 +981,10 @@ namespace monero {
|
||||
return m_is_synced;
|
||||
}
|
||||
|
||||
monero_version monero_wallet::get_version() const {
|
||||
throw runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
string monero_wallet::get_path() const {
|
||||
return m_w2->path();
|
||||
}
|
||||
|
||||
@@ -245,6 +245,13 @@ namespace monero {
|
||||
*/
|
||||
bool is_synced() const;
|
||||
|
||||
/**
|
||||
* Get the wallet's version.
|
||||
*
|
||||
* @return the wallet's version
|
||||
*/
|
||||
monero_version get_version() const;
|
||||
|
||||
/**
|
||||
* Get the path of this wallet's file on disk.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user