55#include <boost/property_tree/ptree.hpp>
56#include <boost/property_tree/json_parser.hpp>
57#include "rapidjson/document.h"
58#include "rapidjson/writer.h"
59#include "rapidjson/stringbuffer.h"
84 virtual rapidjson::Value
to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const = 0;
100 boost::optional<uint32_t> m_number;
101 boost::optional<bool> m_is_release;
103 rapidjson::Value
to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
110 boost::optional<std::string> m_uri;
111 boost::optional<std::string> m_username;
112 boost::optional<std::string> m_password;
114 monero_rpc_connection(
const boost::optional<std::string>& uri = boost::none,
const boost::optional<std::string>& username = boost::none,
const boost::optional<std::string>& password = boost::none) : m_uri(uri), m_username(username), m_password(password) {}
115 rapidjson::Value
to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
128 boost::optional<std::string> m_hash;
129 boost::optional<uint64_t> m_height;
130 boost::optional<uint64_t> m_timestamp;
131 boost::optional<uint64_t> m_size;
132 boost::optional<uint64_t> m_weight;
133 boost::optional<uint64_t> m_long_term_weight;
134 boost::optional<uint64_t> m_depth;
135 boost::optional<uint64_t> m_difficulty;
136 boost::optional<uint64_t> m_cumulative_difficulty;
137 boost::optional<uint32_t> m_major_version;
138 boost::optional<uint32_t> m_minor_version;
139 boost::optional<uint32_t> m_nonce;
140 boost::optional<std::string> m_miner_tx_hash;
141 boost::optional<uint32_t> m_num_txs;
142 boost::optional<bool> m_orphan_status;
143 boost::optional<std::string> m_prev_hash;
144 boost::optional<uint64_t> m_reward;
145 boost::optional<std::string> m_pow_hash;
147 rapidjson::Value
to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
148 std::shared_ptr<monero_block_header> copy(
const std::shared_ptr<monero_block_header>& src,
const std::shared_ptr<monero_block_header>& tgt)
const;
149 virtual void merge(
const std::shared_ptr<monero_block_header>& self,
const std::shared_ptr<monero_block_header>& other);
156 boost::optional<std::string> m_hex;
157 boost::optional<std::shared_ptr<monero_tx>> m_miner_tx;
158 std::vector<std::shared_ptr<monero_tx>> m_txs;
159 std::vector<std::string> m_tx_hashes;
161 rapidjson::Value
to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
162 std::shared_ptr<monero_block> copy(
const std::shared_ptr<monero_block>& src,
const std::shared_ptr<monero_block>& tgt)
const;
163 void merge(
const std::shared_ptr<monero_block_header>& self,
const std::shared_ptr<monero_block_header>& other);
164 void merge(
const std::shared_ptr<monero_block>& self,
const std::shared_ptr<monero_block>& other);
171 static const std::string DEFAULT_PAYMENT_ID;
172 boost::optional<std::shared_ptr<monero_block>> m_block;
173 boost::optional<std::string> m_hash;
174 boost::optional<uint32_t> m_version;
175 boost::optional<bool> m_is_miner_tx;
176 boost::optional<std::string> m_payment_id;
177 boost::optional<uint64_t> m_fee;
178 boost::optional<uint32_t> m_ring_size;
179 boost::optional<bool> m_relay;
180 boost::optional<bool> m_is_relayed;
181 boost::optional<bool> m_is_confirmed;
182 boost::optional<bool> m_in_tx_pool;
183 boost::optional<uint64_t> m_num_confirmations;
184 boost::optional<uint64_t> m_unlock_time;
185 boost::optional<uint64_t> m_last_relayed_timestamp;
186 boost::optional<uint64_t> m_received_timestamp;
187 boost::optional<bool> m_is_double_spend_seen;
188 boost::optional<std::string> m_key;
189 boost::optional<std::string> m_full_hex;
190 boost::optional<std::string> m_pruned_hex;
191 boost::optional<std::string> m_prunable_hex;
192 boost::optional<std::string> m_prunable_hash;
193 boost::optional<uint64_t> m_size;
194 boost::optional<uint64_t> m_weight;
195 std::vector<std::shared_ptr<monero_output>> m_inputs;
196 std::vector<std::shared_ptr<monero_output>> m_outputs;
197 std::vector<uint64_t> m_output_indices;
198 boost::optional<std::string> m_metadata;
199 boost::optional<std::string> m_common_tx_sets;
200 std::vector<uint8_t> m_extra;
201 boost::optional<std::string> m_rct_signatures;
202 boost::optional<std::string> m_rct_sig_prunable;
203 boost::optional<bool> m_is_kept_by_block;
204 boost::optional<bool> m_is_failed;
205 boost::optional<uint64_t> m_last_failed_height;
206 boost::optional<std::string> m_last_failed_hash;
207 boost::optional<uint64_t> m_max_used_block_height;
208 boost::optional<std::string> m_max_used_block_hash;
209 std::vector<std::string> m_signatures;
211 rapidjson::Value
to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
212 static void from_property_tree(
const boost::property_tree::ptree& node, std::shared_ptr<monero_tx> tx);
213 std::shared_ptr<monero_tx> copy(
const std::shared_ptr<monero_tx>& src,
const std::shared_ptr<monero_tx>& tgt)
const;
214 virtual void merge(
const std::shared_ptr<monero_tx>& self,
const std::shared_ptr<monero_tx>& other);
215 boost::optional<uint64_t> get_height()
const;
222 boost::optional<std::string> m_hex;
223 boost::optional<std::string> m_signature;
225 rapidjson::Value
to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
226 static void from_property_tree(
const boost::property_tree::ptree& node,
const std::shared_ptr<monero_key_image>& key_image);
227 static std::vector<std::shared_ptr<monero_key_image>> deserialize_key_images(
const std::string& key_images_json);
228 std::shared_ptr<monero_key_image> copy(
const std::shared_ptr<monero_key_image>& src,
const std::shared_ptr<monero_key_image>& tgt)
const;
229 void merge(
const std::shared_ptr<monero_key_image>& self,
const std::shared_ptr<monero_key_image>& other);
236 std::shared_ptr<monero_tx> m_tx;
237 boost::optional<std::shared_ptr<monero_key_image>> m_key_image;
238 boost::optional<uint64_t> m_amount;
239 boost::optional<uint64_t> m_index;
240 std::vector<uint64_t> m_ring_output_indices;
241 boost::optional<std::string> m_stealth_public_key;
243 rapidjson::Value
to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
244 static void from_property_tree(
const boost::property_tree::ptree& node,
const std::shared_ptr<monero_output>& output);
245 std::shared_ptr<monero_output> copy(
const std::shared_ptr<monero_output>& src,
const std::shared_ptr<monero_output>& tgt)
const;
246 virtual void merge(
const std::shared_ptr<monero_output>& self,
const std::shared_ptr<monero_output>& other);
Definition: monero_daemon.cpp:58
monero_network_type
Definition: monero_daemon_model.h:90
Definition: monero_daemon_model.h:155
rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType &allocator) const
Definition: monero_daemon_model.cpp:212
Definition: monero_daemon_model.h:221
rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType &allocator) const
Definition: monero_daemon_model.cpp:557
Definition: monero_daemon_model.h:235
rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType &allocator) const
Definition: monero_daemon_model.cpp:621
Definition: monero_daemon_model.h:109
rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType &allocator) const
Definition: monero_daemon_model.cpp:111
Definition: monero_daemon_model.h:170
rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType &allocator) const
Definition: monero_daemon_model.cpp:293
Definition: monero_daemon_model.h:99
rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType &allocator) const
Definition: monero_daemon_model.cpp:93
Definition: monero_daemon_model.h:69
virtual rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType &allocator) const =0
std::string serialize() const
Definition: monero_daemon_model.cpp:83