55 #include "daemon/monero_daemon_model.h" 69 uint64_t m_num_blocks_fetched;
70 bool m_received_money;
72 monero_sync_result(
const uint64_t num_blocks_fetched,
const bool received_money) : m_num_blocks_fetched(num_blocks_fetched), m_received_money(received_money) {}
74 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
81 boost::optional<uint32_t> m_account_index;
82 boost::optional<uint32_t> m_index;
83 boost::optional<string> m_address;
84 boost::optional<string> m_label;
85 boost::optional<uint64_t> m_balance;
86 boost::optional<uint64_t> m_unlocked_balance;
87 boost::optional<uint64_t> m_num_unspent_outputs;
88 boost::optional<bool> m_is_used;
89 boost::optional<uint64_t> m_num_blocks_to_unlock;
91 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
98 boost::optional<uint32_t> m_index;
99 boost::optional<string> m_primary_address;
100 boost::optional<uint64_t> m_balance;
101 boost::optional<uint64_t> m_unlocked_balance;
102 boost::optional<string> m_tag;
103 vector<monero_subaddress> m_subaddresses;
105 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
112 boost::optional<string> m_address;
113 boost::optional<uint64_t> m_amount;
116 monero_destination(
const string& address, uint64_t amount) : m_address(address), m_amount(amount) {}
117 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
118 static void from_property_tree(
const boost::property_tree::ptree& node,
const shared_ptr<monero_destination>& destination);
119 shared_ptr<monero_destination> copy(
const shared_ptr<monero_destination>& src,
const shared_ptr<monero_destination>& tgt)
const;
131 shared_ptr<monero_tx_wallet> m_tx;
132 boost::optional<uint64_t> m_amount;
133 boost::optional<uint32_t> m_account_index;
134 boost::optional<uint64_t> m_num_suggested_confirmations;
136 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
137 static void from_property_tree(
const boost::property_tree::ptree& node,
const shared_ptr<monero_transfer>& transfer);
138 virtual boost::optional<bool> is_incoming()
const = 0;
139 shared_ptr<monero_transfer> copy(
const shared_ptr<monero_transfer>& src,
const shared_ptr<monero_transfer>& tgt)
const;
140 boost::optional<bool> is_outgoing()
const {
141 if (is_incoming() == boost::none)
return boost::none;
142 return !(*is_incoming());
144 void merge(
const shared_ptr<monero_transfer>&
self,
const shared_ptr<monero_transfer>& other);
151 boost::optional<uint32_t> m_subaddress_index;
152 boost::optional<string> m_address;
154 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
155 shared_ptr<monero_incoming_transfer> copy(
const shared_ptr<monero_transfer>& src,
const shared_ptr<monero_transfer>& tgt)
const;
156 shared_ptr<monero_incoming_transfer> copy(
const shared_ptr<monero_incoming_transfer>& src,
const shared_ptr<monero_incoming_transfer>& tgt)
const;
157 boost::optional<bool> is_incoming()
const;
158 void merge(
const shared_ptr<monero_transfer>&
self,
const shared_ptr<monero_transfer>& other);
159 void merge(
const shared_ptr<monero_incoming_transfer>&
self,
const shared_ptr<monero_incoming_transfer>& other);
166 vector<uint32_t> m_subaddress_indices;
167 vector<string> m_addresses;
168 vector<shared_ptr<monero_destination>> m_destinations;
170 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
171 shared_ptr<monero_outgoing_transfer> copy(
const shared_ptr<monero_transfer>& src,
const shared_ptr<monero_transfer>& tgt)
const;
172 shared_ptr<monero_outgoing_transfer> copy(
const shared_ptr<monero_outgoing_transfer>& src,
const shared_ptr<monero_outgoing_transfer>& tgt)
const;
173 boost::optional<bool> is_incoming()
const;
174 void merge(
const shared_ptr<monero_transfer>&
self,
const shared_ptr<monero_transfer>& other);
175 void merge(
const shared_ptr<monero_outgoing_transfer>&
self,
const shared_ptr<monero_outgoing_transfer>& other);
184 boost::optional<bool> m_is_incoming;
185 boost::optional<string> m_address;
186 vector<string> m_addresses;
187 boost::optional<uint32_t> m_subaddress_index;
188 vector<uint32_t> m_subaddress_indices;
189 vector<shared_ptr<monero_destination>> m_destinations;
190 boost::optional<bool> m_has_destinations;
191 boost::optional<shared_ptr<monero_tx_query>> m_tx_query;
193 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
194 static void from_property_tree(
const boost::property_tree::ptree& node,
const shared_ptr<monero_transfer_query>& transfer_query);
195 static shared_ptr<monero_transfer_query> deserialize_from_block(
const string& transfer_query_json);
196 shared_ptr<monero_transfer_query> copy(
const shared_ptr<monero_transfer>& src,
const shared_ptr<monero_transfer>& tgt)
const;
197 shared_ptr<monero_transfer_query> copy(
const shared_ptr<monero_transfer_query>& src,
const shared_ptr<monero_transfer_query>& tgt)
const;
198 boost::optional<bool> is_incoming()
const;
206 boost::optional<uint32_t> m_account_index;
207 boost::optional<uint32_t> m_subaddress_index;
208 boost::optional<bool> m_is_spent;
209 boost::optional<bool> m_is_frozen;
211 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
212 static void from_property_tree(
const boost::property_tree::ptree& node,
const shared_ptr<monero_output_wallet>& output_wallet);
213 shared_ptr<monero_output_wallet> copy(
const shared_ptr<monero_output>& src,
const shared_ptr<monero_output>& tgt)
const;
214 shared_ptr<monero_output_wallet> copy(
const shared_ptr<monero_output_wallet>& src,
const shared_ptr<monero_output_wallet>& tgt)
const;
215 void merge(
const shared_ptr<monero_output>&
self,
const shared_ptr<monero_output>& other);
216 void merge(
const shared_ptr<monero_output_wallet>&
self,
const shared_ptr<monero_output_wallet>& other);
226 vector<uint32_t> m_subaddress_indices;
227 boost::optional<shared_ptr<monero_tx_query>> m_tx_query;
230 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
231 static void from_property_tree(
const boost::property_tree::ptree& node,
const shared_ptr<monero_output_query>& output_query);
232 static shared_ptr<monero_output_query> deserialize_from_block(
const string& output_query_json);
233 bool is_default()
const;
234 shared_ptr<monero_output_query> copy(
const shared_ptr<monero_output>& src,
const shared_ptr<monero_output>& tgt)
const;
235 shared_ptr<monero_output_query> copy(
const shared_ptr<monero_output_wallet>& src,
const shared_ptr<monero_output_wallet>& tgt)
const;
236 shared_ptr<monero_output_query> copy(
const shared_ptr<monero_output_query>& src,
const shared_ptr<monero_output_query>& tgt)
const;
240 static const unique_ptr<monero_output_wallet> M_EMPTY_OUTPUT;
247 boost::optional<shared_ptr<monero_tx_set>> m_tx_set;
248 boost::optional<bool> m_is_incoming;
249 boost::optional<bool> m_is_outgoing;
250 vector<shared_ptr<monero_incoming_transfer>> m_incoming_transfers;
251 boost::optional<shared_ptr<monero_outgoing_transfer>> m_outgoing_transfer;
252 boost::optional<string> m_note;
253 boost::optional<bool> m_is_locked;
254 boost::optional<uint64_t> m_input_sum;
255 boost::optional<uint64_t> m_output_sum;
256 boost::optional<string> m_change_address;
257 boost::optional<uint64_t> m_change_amount;
258 boost::optional<uint32_t> m_num_dummy_outputs;
259 boost::optional<string> m_extra_hex;
261 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
262 static void from_property_tree(
const boost::property_tree::ptree& node,
const shared_ptr<monero_tx_wallet>& tx_wallet);
263 shared_ptr<monero_tx_wallet> copy(
const shared_ptr<monero_tx>& src,
const shared_ptr<monero_tx>& tgt)
const;
264 shared_ptr<monero_tx_wallet> copy(
const shared_ptr<monero_tx_wallet>& src,
const shared_ptr<monero_tx_wallet>& tgt)
const;
265 void merge(
const shared_ptr<monero_tx>&
self,
const shared_ptr<monero_tx>& other);
266 void merge(
const shared_ptr<monero_tx_wallet>&
self,
const shared_ptr<monero_tx_wallet>& other);
275 boost::optional<bool> m_is_outgoing;
276 boost::optional<bool> m_is_incoming;
277 vector<string> m_tx_hashes;
278 boost::optional<bool> m_has_payment_id;
279 vector<string> m_payment_ids;
280 boost::optional<uint64_t> m_height;
281 boost::optional<uint64_t> m_min_height;
282 boost::optional<uint64_t> m_max_height;
283 boost::optional<uint64_t> m_include_outputs;
284 boost::optional<shared_ptr<monero_transfer_query>> m_transfer_query;
285 boost::optional<shared_ptr<monero_output_query>> m_output_query;
287 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
288 static void from_property_tree(
const boost::property_tree::ptree& node,
const shared_ptr<monero_tx_query>& tx_query);
289 static shared_ptr<monero_tx_query> deserialize_from_block(
const string& tx_query_json);
290 shared_ptr<monero_tx_query> copy(
const shared_ptr<monero_tx>& src,
const shared_ptr<monero_tx>& tgt)
const;
291 shared_ptr<monero_tx_query> copy(
const shared_ptr<monero_tx_wallet>& src,
const shared_ptr<monero_tx_wallet>& tgt)
const;
292 shared_ptr<monero_tx_query> copy(
const shared_ptr<monero_tx_query>& src,
const shared_ptr<monero_tx_query>& tgt)
const;
305 vector<shared_ptr<monero_tx_wallet>> m_txs;
306 boost::optional<string> m_signed_tx_hex;
307 boost::optional<string> m_unsigned_tx_hex;
308 boost::optional<string> m_multisig_tx_hex;
311 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
319 string m_standard_address;
321 string m_integrated_address;
323 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
340 vector<shared_ptr<monero_destination>> m_destinations;
341 boost::optional<string> m_payment_id;
342 boost::optional<monero_send_priority> m_priority;
343 boost::optional<uint32_t> m_ring_size;
344 boost::optional<uint64_t> m_fee;
345 boost::optional<uint32_t> m_account_index;
346 vector<uint32_t> m_subaddress_indices;
347 boost::optional<uint64_t> m_unlock_time;
348 boost::optional<bool> m_can_split;
349 boost::optional<bool> m_do_not_relay;
350 boost::optional<string> m_note;
351 boost::optional<string> m_recipient_name;
352 boost::optional<uint64_t> m_below_amount;
353 boost::optional<bool> m_sweep_each_subaddress;
354 boost::optional<string> m_key_image;
358 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
359 static shared_ptr<monero_send_request> deserialize(
const string& send_request_json);
367 boost::optional<uint64_t> m_height;
368 boost::optional<uint64_t> m_spent_amount;
369 boost::optional<uint64_t> m_unspent_amount;
371 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
380 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
387 boost::optional<bool> m_in_tx_pool;
388 boost::optional<uint64_t> m_num_confirmations;
389 boost::optional<uint64_t> m_received_amount;
391 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
398 boost::optional<uint64_t> m_total_amount;
399 boost::optional<uint64_t> m_unconfirmed_spent_amount;
401 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
410 uint32_t m_threshold;
411 uint32_t m_num_participants;
413 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
422 boost::optional<string> m_address;
423 boost::optional<string> m_multisig_hex;
425 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
432 boost::optional<string> m_signed_multisig_tx_hex;
433 vector<string> m_tx_hashes;
435 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
442 boost::optional<uint64_t> m_index;
443 boost::optional<string> m_address;
444 boost::optional<string> m_description;
445 boost::optional<string> m_payment_id;
448 monero_address_book_entry(uint64_t index,
const string& address,
const string& description,
const string& payment_id) : m_index(index), m_address(address), m_description(description), m_payment_id(payment_id) {}
449 rapidjson::Value to_rapidjson_val(rapidjson::Document::AllocatorType& allocator)
const;
Definition: monero_wallet_model.h:407
Definition: monero_daemon.cpp:58
Definition: monero_wallet_model.h:111
Definition: monero_wallet_model.h:318
Definition: monero_wallet_model.h:421
Definition: monero_wallet_model.h:150
Definition: monero_wallet_model.h:274
Definition: monero_daemon_model.h:71
Definition: monero_wallet_model.h:431
Definition: monero_daemon_model.h:235
Definition: monero_daemon_model.h:170
Definition: monero_wallet_model.h:246
monero_send_priority
Definition: monero_wallet_model.h:329
Definition: monero_wallet_model.h:397
Definition: monero_wallet_model.h:165
Definition: monero_wallet_model.h:68
Definition: monero_wallet_model.h:304
Definition: monero_wallet_model.h:441
Definition: monero_wallet_model.h:386
Definition: monero_wallet_model.h:225
Definition: monero_wallet_model.h:339
Definition: monero_wallet_model.h:97
Definition: monero_wallet_model.h:80
Definition: monero_wallet_model.h:205
Definition: monero_wallet_model.h:183
Definition: monero_wallet_model.h:366
Definition: monero_wallet_model.h:377
Definition: monero_wallet_model.h:130