diff --git a/src/daemon/monero_daemon_model.cpp b/src/daemon/monero_daemon_model.cpp index 53c4ee6..78cbd6a 100644 --- a/src/daemon/monero_daemon_model.cpp +++ b/src/daemon/monero_daemon_model.cpp @@ -92,19 +92,19 @@ namespace monero { if (timestamp != boost::none) node.put("timestamp", *timestamp); if (size != boost::none) node.put("size", *size); if (weight != boost::none) node.put("weight", *weight); - if (long_term_weight != boost::none) node.put("long_term_weight", *long_term_weight); + if (long_term_weight != boost::none) node.put("longTermWeight", *long_term_weight); if (depth != boost::none) node.put("depth", *depth); if (difficulty != boost::none) node.put("difficulty", *difficulty); - if (cumulative_difficulty != boost::none) node.put("cumulative_difficulty", *height); - if (major_version != boost::none) node.put("major_version", *major_version); - if (minor_version != boost::none) node.put("minor_version", *minor_version); + if (cumulative_difficulty != boost::none) node.put("cumulativeDifficulty", *height); + if (major_version != boost::none) node.put("majorVersion", *major_version); + if (minor_version != boost::none) node.put("minorVersion", *minor_version); if (nonce != boost::none) node.put("nonce", *nonce); - if (miner_tx_id != boost::none) node.put("miner_tx_id", *miner_tx_id); - if (num_txs != boost::none) node.put("num_txs", *num_txs); - if (orphan_status != boost::none) node.put("orphan_status", *orphan_status); - if (prev_id != boost::none) node.put("prev_id", *prev_id); + if (miner_tx_id != boost::none) node.put("minerTxId", *miner_tx_id); + if (num_txs != boost::none) node.put("numTxs", *num_txs); + if (orphan_status != boost::none) node.put("orphanStatus", *orphan_status); + if (prev_id != boost::none) node.put("prevId", *prev_id); if (reward != boost::none) node.put("reward", *reward); - if (pow_hash != boost::none) node.put("pow_hash", *pow_hash); + if (pow_hash != boost::none) node.put("powHash", *pow_hash); return node; } @@ -136,9 +136,9 @@ namespace monero { boost::property_tree::ptree monero_block::to_property_tree() const { boost::property_tree::ptree node = monero_block_header::to_property_tree(); if (hex != boost::none) node.put("hex", *hex); - if (miner_tx != boost::none) node.add_child("miner_tx", (*miner_tx)->to_property_tree()); + if (miner_tx != boost::none) node.add_child("minerTx", (*miner_tx)->to_property_tree()); if (!txs.empty()) node.add_child("txs", monero_utils::to_property_tree(txs)); - if (!tx_ids.empty()) node.add_child("tx_ids", monero_utils::to_property_tree(tx_ids)); + if (!tx_ids.empty()) node.add_child("txIds", monero_utils::to_property_tree(tx_ids)); return node; } @@ -235,24 +235,24 @@ namespace monero { boost::property_tree::ptree node; if (id != boost::none) node.put("id", *id); if (version != boost::none) node.put("version", *version); - if (is_miner_tx != boost::none) node.put("is_miner_tx", *is_miner_tx); - if (payment_id != boost::none) node.put("payment_id", *payment_id); + if (is_miner_tx != boost::none) node.put("isMinerTx", *is_miner_tx); + if (payment_id != boost::none) node.put("paymentId", *payment_id); if (fee != boost::none) node.put("fee", *fee); if (mixin != boost::none) node.put("mixin", *mixin); - if (do_not_relay != boost::none) node.put("do_not_relay", *do_not_relay); - if (is_relayed != boost::none) node.put("is_relayed", *is_relayed); - if (is_confirmed != boost::none) node.put("is_confirmed", *is_confirmed); - if (in_tx_pool != boost::none) node.put("in_tx_pool", *in_tx_pool); - if (num_confirmations != boost::none) node.put("num_confirmations", *num_confirmations); - if (unlock_time != boost::none) node.put("unlock_time", *unlock_time); - if (last_relayed_timestamp != boost::none) node.put("last_relayed_timestamp", *last_relayed_timestamp); - if (received_timestamp != boost::none) node.put("received_timestamp", *received_timestamp); - if (is_double_spend_seen != boost::none) node.put("is_double_spend_seen", *is_double_spend_seen); + if (do_not_relay != boost::none) node.put("doNotRelay", *do_not_relay); + if (is_relayed != boost::none) node.put("isRelayed", *is_relayed); + if (is_confirmed != boost::none) node.put("isConfirmed", *is_confirmed); + if (in_tx_pool != boost::none) node.put("inTxPool", *in_tx_pool); + if (num_confirmations != boost::none) node.put("numConfirmations", *num_confirmations); + if (unlock_time != boost::none) node.put("unlockTime", *unlock_time); + if (last_relayed_timestamp != boost::none) node.put("lastRelayedTimestamp", *last_relayed_timestamp); + if (received_timestamp != boost::none) node.put("receivedTimestamp", *received_timestamp); + if (is_double_spend_seen != boost::none) node.put("isDoubleSpendSeen", *is_double_spend_seen); if (key != boost::none) node.put("key", *key); - if (full_hex != boost::none) node.put("full_hex", *full_hex); - if (pruned_hex != boost::none) node.put("pruned_hex", *pruned_hex); - if (prunable_hex != boost::none) node.put("prunable_hex", *prunable_hex); - if (prunable_hash != boost::none) node.put("prunable_hash", *prunable_hash); + if (full_hex != boost::none) node.put("fullHex", *full_hex); + if (pruned_hex != boost::none) node.put("prunedHex", *pruned_hex); + if (prunable_hex != boost::none) node.put("prunableHex", *prunable_hex); + if (prunable_hash != boost::none) node.put("prunableHash", *prunable_hash); if (size != boost::none) node.put("size", *size); if (weight != boost::none) node.put("weight", *weight); if (!vins.empty()) node.add_child("vins", monero_utils::to_property_tree(vins)); @@ -263,12 +263,12 @@ namespace monero { if (!extra.empty()) node.add_child("extra", monero_utils::to_property_tree(extra)); if (rct_signatures != boost::none) throw runtime_error("rct_signatures not implemented"); if (rct_sig_prunable != boost::none) throw runtime_error("rct_sig_prunable not implemented"); - if (is_kept_by_block != boost::none) node.put("is_kept_by_block", *is_kept_by_block); + if (is_kept_by_block != boost::none) node.put("isKeptByBlock", *is_kept_by_block); if (is_failed != boost::none) node.put("is_failed", *is_failed); - if (last_failed_height != boost::none) node.put("last_failed_height", *last_failed_height); - if (last_failed_id != boost::none) node.put("last_failed_id", *last_failed_id); - if (max_used_block_height != boost::none) node.put("max_used_block_height", *max_used_block_height); - if (max_used_block_id != boost::none) node.put("max_used_block_id", *max_used_block_id); + if (last_failed_height != boost::none) node.put("lastFailedHeight", *last_failed_height); + if (last_failed_id != boost::none) node.put("lastFailedId", *last_failed_id); + if (max_used_block_height != boost::none) node.put("maxUsedBlockHeight", *max_used_block_height); + if (max_used_block_id != boost::none) node.put("maxUsedBlockId", *max_used_block_id); if (!signatures.empty()) throw runtime_error("signatures not implemented"); return node; } @@ -442,11 +442,11 @@ namespace monero { boost::property_tree::ptree monero_output::to_property_tree() const { boost::property_tree::ptree node; - if (key_image != boost::none) node.add_child("key_image", (*key_image)->to_property_tree()); + if (key_image != boost::none) node.add_child("keyImage", (*key_image)->to_property_tree()); if (amount != boost::none) node.put("amount", *amount); if (index != boost::none) node.put("index", *index); - if (!ring_output_indices.empty()) node.add_child("ring_output_indices", monero_utils::to_property_tree(ring_output_indices)); - if (stealth_public_key != boost::none) node.put("stealth_public_key", *stealth_public_key); + if (!ring_output_indices.empty()) node.add_child("ringOutputIndices", monero_utils::to_property_tree(ring_output_indices)); + if (stealth_public_key != boost::none) node.put("stealthPublicKey", *stealth_public_key); return node; } diff --git a/src/utils/monero_utils.cpp b/src/utils/monero_utils.cpp index 1f245a7..f3cb631 100644 --- a/src/utils/monero_utils.cpp +++ b/src/utils/monero_utils.cpp @@ -80,15 +80,15 @@ shared_ptr node_to_transfer_request(const boost::proper if (key == string("is_incoming")) transfer_request->is_incoming = it->second.get_value(); else if (key == string("address")) transfer_request->address = it->second.data(); else if (key == string("addresses")) throw runtime_error("addresses not implemented"); - else if (key == string("subaddress_index")) transfer_request->subaddress_index = it->second.get_value(); - else if (key == string("subaddress_indices")) { + else if (key == string("subadressIndex")) transfer_request->subaddress_index = it->second.get_value(); + else if (key == string("subaddresIndices")) { vector subaddress_indices; for (const auto& child : it->second) subaddress_indices.push_back(child.second.get_value()); transfer_request->subaddress_indices = subaddress_indices; } else if (key == string("destinations")) throw runtime_error("destinations not implemented"); - else if (key == string("has_destinations")) transfer_request->has_destinations = it->second.get_value(); - else if (key == string("tx_request")) throw runtime_error("tx_request not implemented"); + else if (key == string("hasDestinations")) transfer_request->has_destinations = it->second.get_value(); + else if (key == string("txRequest")) throw runtime_error("txRequest not implemented"); } return transfer_request; @@ -115,8 +115,8 @@ void node_to_output(const boost::property_tree::ptree& node, shared_ptrkey_image = node_to_key_image(it->second); else if (key == string("amount")) output->amount = it->second.get_value(); else if (key == string("index")) output->index = it->second.get_value(); - else if (key == string("ring_output_indices")) throw runtime_error("node_to_tx() deserialize ring_output_indices not implemented"); - else if (key == string("stealth_public_key")) throw runtime_error("node_to_tx() deserialize stealth_public_key not implemented"); + else if (key == string("ringOutputIndices")) throw runtime_error("node_to_tx() deserialize ringOutputIndices not implemented"); + else if (key == string("stealthPublicKey")) throw runtime_error("node_to_tx() deserialize stealthPublicKey not implemented"); } } @@ -124,11 +124,11 @@ void node_to_output_wallet(const boost::property_tree::ptree& node, shared_ptrfirst; - if (key == string("account_index")) output_wallet->account_index = it->second.get_value(); - else if (key == string("subaddress_index")) output_wallet->subaddress_index = it->second.get_value(); - else if (key == string("is_spent")) output_wallet->is_spent = it->second.get_value(); - else if (key == string("is_unlocked")) output_wallet->is_unlocked = it->second.get_value(); - else if (key == string("is_frozen")) output_wallet->is_frozen = it->second.get_value(); + if (key == string("accountIndex")) output_wallet->account_index = it->second.get_value(); + else if (key == string("subaddressIndex")) output_wallet->subaddress_index = it->second.get_value(); + else if (key == string("isSpent")) output_wallet->is_spent = it->second.get_value(); + else if (key == string("isUnlocked")) output_wallet->is_unlocked = it->second.get_value(); + else if (key == string("isFrozen")) output_wallet->is_frozen = it->second.get_value(); } } @@ -139,8 +139,8 @@ shared_ptr node_to_output_request(const boost::property_t // initialize request from node for (boost::property_tree::ptree::const_iterator it = node.begin(); it != node.end(); ++it) { string key = it->first; - if (key == string("subaddress_indices")) for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) output_request->subaddress_indices.push_back(it2->second.get_value()); - else if (key == string("tx_request")) {} // ignored + if (key == string("subaddressIndices")) for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) output_request->subaddress_indices.push_back(it2->second.get_value()); + else if (key == string("txRequest")) {} // ignored } return output_request; @@ -153,40 +153,40 @@ void node_to_tx(const boost::property_tree::ptree& node, shared_ptr t string key = it->first; if (key == string("id")) tx->id = it->second.data(); else if (key == string("version")) throw runtime_error("version deserializationn not implemented"); - else if (key == string("is_miner_tx")) tx->is_miner_tx = it->second.get_value(); - else if (key == string("payment_id")) throw runtime_error("payment_id deserializationn not implemented"); + else if (key == string("isMinerTx")) tx->is_miner_tx = it->second.get_value(); + else if (key == string("paymentId")) throw runtime_error("paymentId deserializationn not implemented"); else if (key == string("fee")) throw runtime_error("fee deserialization not implemented"); else if (key == string("mixin")) throw runtime_error("mixin deserialization not implemented"); - else if (key == string("do_not_relay")) tx->do_not_relay = it->second.get_value(); - else if (key == string("is_relayed")) tx->is_relayed = it->second.get_value(); - else if (key == string("is_confirmed")) tx->is_confirmed = it->second.get_value(); - else if (key == string("in_tx_pool")) tx->in_tx_pool = it->second.get_value(); - else if (key == string("num_confirmations")) throw runtime_error("num_confirmations deserialization not implemented"); - else if (key == string("unlock_time")) throw runtime_error("unlock_time deserialization not implemented"); - else if (key == string("last_relayed_timestamp")) throw runtime_error("last_relayed_timestamp deserialization not implemented"); - else if (key == string("received_timestamp")) throw runtime_error("received_timestamp deserializationn not implemented"); - else if (key == string("is_double_spend_seen")) tx->is_double_spend_seen = it->second.get_value(); + else if (key == string("doNotRelay")) tx->do_not_relay = it->second.get_value(); + else if (key == string("isRelayed")) tx->is_relayed = it->second.get_value(); + else if (key == string("isConfirmed")) tx->is_confirmed = it->second.get_value(); + else if (key == string("inTxPool")) tx->in_tx_pool = it->second.get_value(); + else if (key == string("numConfirmations")) throw runtime_error("numConfirmations deserialization not implemented"); + else if (key == string("unlockTime")) throw runtime_error("unlockTime deserialization not implemented"); + else if (key == string("lastRelayedTimestamp")) throw runtime_error("lastRelayedTimestamp deserialization not implemented"); + else if (key == string("receivedTimestamp")) throw runtime_error("receivedTimestamp deserializationn not implemented"); + else if (key == string("isDoubleSpendSeen")) tx->is_double_spend_seen = it->second.get_value(); else if (key == string("key")) tx->key = it->second.data(); - else if (key == string("full_hex")) tx->full_hex = it->second.data(); - else if (key == string("pruned_hex")) tx->pruned_hex = it->second.data(); - else if (key == string("prunable_hex")) tx->prunable_hex = it->second.data(); - else if (key == string("prunable_hash")) tx->prunable_hash = it->second.data(); + else if (key == string("fullHex")) tx->full_hex = it->second.data(); + else if (key == string("prunedHex")) tx->pruned_hex = it->second.data(); + else if (key == string("prunableHex")) tx->prunable_hex = it->second.data(); + else if (key == string("prunableHash")) tx->prunable_hash = it->second.data(); else if (key == string("size")) throw runtime_error("size deserialization not implemented"); else if (key == string("weight")) throw runtime_error("weight deserialization not implemented"); else if (key == string("vins")) throw runtime_error("vins deserializationn not implemented"); else if (key == string("vouts")) throw runtime_error("vouts deserializationn not implemented"); - else if (key == string("m_output_indices")) throw runtime_error("m_output_indices deserialization not implemented"); + else if (key == string("outputIndices")) throw runtime_error("m_output_indices deserialization not implemented"); else if (key == string("metadata")) throw runtime_error("metadata deserialization not implemented"); - else if (key == string("common_tx_sets")) throw runtime_error("common_tx_sets deserialization not implemented"); + else if (key == string("commonTxSets")) throw runtime_error("commonTxSets deserialization not implemented"); else if (key == string("extra")) throw runtime_error("extra deserialization not implemented"); - else if (key == string("rct_signatures")) throw runtime_error("rct_signatures deserialization not implemented"); - else if (key == string("rct_sig_prunable")) throw runtime_error("rct_sig_prunable deserialization not implemented"); - else if (key == string("is_kept_by_block")) tx->is_kept_by_block = it->second.get_value(); - else if (key == string("is_failed")) tx->is_failed = it->second.get_value(); - else if (key == string("last_failed_height")) throw runtime_error("last_failed_height deserialization not implemented"); - else if (key == string("last_failed_id")) tx->last_failed_id = it->second.data(); - else if (key == string("max_used_block_height")) throw runtime_error("max_used_block_height deserialization not implemented"); - else if (key == string("max_used_block_id")) tx->max_used_block_id = it->second.data(); + else if (key == string("rctSignatures")) throw runtime_error("rctSignatures deserialization not implemented"); + else if (key == string("rctSigPrunable")) throw runtime_error("rctSigPrunable deserialization not implemented"); + else if (key == string("isKeptByBlock")) tx->is_kept_by_block = it->second.get_value(); + else if (key == string("isFailed")) tx->is_failed = it->second.get_value(); + else if (key == string("lastFailedHeight")) throw runtime_error("lastFailedHeight deserialization not implemented"); + else if (key == string("lastFailedId")) tx->last_failed_id = it->second.data(); + else if (key == string("maxUsedBlockHeight")) throw runtime_error("maxUsedBlockHeight deserialization not implemented"); + else if (key == string("maxUsedBlockId")) tx->max_used_block_id = it->second.data(); else if (key == string("signatures")) throw runtime_error("signatures deserialization not implemented"); } } @@ -208,17 +208,17 @@ shared_ptr nodeToTxRequest(const boost::property_tree::ptree& // initialize request from node for (boost::property_tree::ptree::const_iterator it = node.begin(); it != node.end(); ++it) { string key = it->first; - if (key == string("is_outgoing")) tx_request->is_outgoing = it->second.get_value(); - else if (key == string("is_incoming")) tx_request->is_incoming = it->second.get_value(); - else if (key == string("tx_ids")) for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) tx_request->tx_ids.push_back(it2->second.data()); - else if (key == string("has_payment_id")) tx_request->has_payment_id = it->second.get_value(); - else if (key == string("payment_ids")) for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) tx_request->payment_ids.push_back(it2->second.data()); + if (key == string("isOutgoing")) tx_request->is_outgoing = it->second.get_value(); + else if (key == string("isIncoming")) tx_request->is_incoming = it->second.get_value(); + else if (key == string("txIds")) for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) tx_request->tx_ids.push_back(it2->second.data()); + else if (key == string("hasPaymentId")) tx_request->has_payment_id = it->second.get_value(); + else if (key == string("paymentIds")) for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) tx_request->payment_ids.push_back(it2->second.data()); else if (key == string("height")) tx_request->height = it->second.get_value(); - else if (key == string("min_height")) tx_request->min_height = it->second.get_value(); - else if (key == string("max_height")) tx_request->max_height = it->second.get_value(); - else if (key == string("include_outputs")) tx_request->include_outputs = it->second.get_value(); - else if (key == string("transfer_request")) tx_request->transfer_request = node_to_transfer_request(it->second); - else if (key == string("output_request")) tx_request->output_request = node_to_output_request(it->second); + else if (key == string("minHeight")) tx_request->min_height = it->second.get_value(); + else if (key == string("maxHeight")) tx_request->max_height = it->second.get_value(); + else if (key == string("includeOutputs")) tx_request->include_outputs = it->second.get_value(); + else if (key == string("transferRequest")) tx_request->transfer_request = node_to_transfer_request(it->second); + else if (key == string("outputRequest")) tx_request->output_request = node_to_output_request(it->second); } return tx_request; @@ -402,21 +402,21 @@ shared_ptr monero_utils::deserialize_send_request(const str send_request->destinations.push_back(node_to_destination(it2->second)); } } - else if (key == string("payment_id")) send_request->payment_id = it->second.data(); - else if (key == string("priority")) throw runtime_error("deserialize_send_request() payment_id not implemented"); + else if (key == string("paymentId")) send_request->payment_id = it->second.data(); + else if (key == string("priority")) throw runtime_error("deserialize_send_request() priority not implemented"); else if (key == string("mixin")) send_request->mixin = it->second.get_value(); - else if (key == string("ring_size")) send_request->ring_size = it->second.get_value(); + else if (key == string("ringSize")) send_request->ring_size = it->second.get_value(); else if (key == string("fee")) send_request->fee = it->second.get_value(); - else if (key == string("account_index")) send_request->account_index = it->second.get_value(); - else if (key == string("subaddress_indices")) for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) send_request->subaddress_indices.push_back(it2->second.get_value()); - else if (key == string("unlock_time")) send_request->unlock_time = it->second.get_value(); - else if (key == string("can_split")) send_request->can_split = it->second.get_value(); - else if (key == string("do_not_relay")) send_request->do_not_relay = it->second.get_value(); + else if (key == string("accountIndex")) send_request->account_index = it->second.get_value(); + else if (key == string("subaddressIndices")) for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) send_request->subaddress_indices.push_back(it2->second.get_value()); + else if (key == string("unlockTime")) send_request->unlock_time = it->second.get_value(); + else if (key == string("canSplit")) send_request->can_split = it->second.get_value(); + else if (key == string("doNotRelay")) send_request->do_not_relay = it->second.get_value(); else if (key == string("note")) send_request->note = it->second.data(); - else if (key == string("recipient_name")) send_request->recipient_name = it->second.data(); - else if (key == string("below_amount")) send_request->below_amount = it->second.get_value(); - else if (key == string("sweep_each_subaddress")) send_request->sweep_each_subaddress = it->second.get_value(); - else if (key == string("key_image")) send_request->key_image = it->second.data(); + else if (key == string("recipientName")) send_request->recipient_name = it->second.data(); + else if (key == string("belowAmount")) send_request->below_amount = it->second.get_value(); + else if (key == string("sweepEachSubaddress")) send_request->sweep_each_subaddress = it->second.get_value(); + else if (key == string("keyImage")) send_request->key_image = it->second.data(); } return send_request; @@ -433,7 +433,7 @@ vector> monero_utils::deserialize_key_images(const vector> key_images; for (boost::property_tree::ptree::const_iterator it = node.begin(); it != node.end(); ++it) { string key = it->first; - if (key == string("key_images")) { + if (key == string("keyImages")) { for (boost::property_tree::ptree::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) { key_images.push_back(node_to_key_image(it2->second)); } diff --git a/src/wallet/monero_wallet_model.cpp b/src/wallet/monero_wallet_model.cpp index 14f9592..d875b4c 100644 --- a/src/wallet/monero_wallet_model.cpp +++ b/src/wallet/monero_wallet_model.cpp @@ -80,9 +80,9 @@ namespace monero { boost::property_tree::ptree monero_account::to_property_tree() const { boost::property_tree::ptree node; if (index != boost::none) node.put("index", *index); - if (primary_address != boost::none) node.put("primary_address", *primary_address); + if (primary_address != boost::none) node.put("primaryAddress", *primary_address); if (balance != boost::none) node.put("balance", *balance); - if (unlocked_balance != boost::none) node.put("unlocked_balance", *unlocked_balance); + if (unlocked_balance != boost::none) node.put("unlockedBalance", *unlocked_balance); if (!subaddresses.empty()) node.add_child("subaddresses", monero_utils::to_property_tree(subaddresses)); return node; } @@ -91,15 +91,15 @@ namespace monero { boost::property_tree::ptree monero_subaddress::to_property_tree() const { boost::property_tree::ptree node; - if (account_index != boost::none) node.put("account_index", *account_index); + if (account_index != boost::none) node.put("accountIndex", *account_index); if (index != boost::none) node.put("index", *index); if (address != boost::none) node.put("address", *address); if (label != boost::none) node.put("label", *label); if (balance != boost::none) node.put("balance", *balance); - if (unlocked_balance != boost::none) node.put("unlocked_balance", *unlocked_balance); - if (num_unspent_outputs != boost::none) node.put("num_unspent_outputs", *num_unspent_outputs); + if (unlocked_balance != boost::none) node.put("unlockedBalance", *unlocked_balance); + if (num_unspent_outputs != boost::none) node.put("numUnspentOutputs", *num_unspent_outputs); if (is_used != boost::none) node.put("is_used", *is_used); - if (num_blocks_to_unlock != boost::none) node.put("num_blocks_to_unlock", *num_blocks_to_unlock); + if (num_blocks_to_unlock != boost::none) node.put("numBlocksToUnlock", *num_blocks_to_unlock); return node; } @@ -138,8 +138,8 @@ namespace monero { boost::property_tree::ptree monero_tx_wallet::to_property_tree() const { boost::property_tree::ptree node = monero_tx::to_property_tree(); - if (!incoming_transfers.empty()) node.add_child("incoming_transfers", monero_utils::to_property_tree(incoming_transfers)); - if (outgoing_transfer != boost::none) node.add_child("outgoing_transfer", (*outgoing_transfer)->to_property_tree()); + if (!incoming_transfers.empty()) node.add_child("incomingTransfers", monero_utils::to_property_tree(incoming_transfers)); + if (outgoing_transfer != boost::none) node.add_child("outgoingTransfers", (*outgoing_transfer)->to_property_tree()); if (note != boost::none) node.put("note", *note); return node; } @@ -216,16 +216,16 @@ namespace monero { boost::property_tree::ptree monero_tx_request::to_property_tree() const { boost::property_tree::ptree node = monero_tx_wallet::to_property_tree(); - if (is_outgoing != boost::none) node.put("is_outgoing", *is_outgoing); - if (is_incoming != boost::none) node.put("is_incoming", *is_incoming); - if (!tx_ids.empty()) node.add_child("tx_ids", monero_utils::to_property_tree(tx_ids)); - if (has_payment_id != boost::none) node.put("has_payment_id", *has_payment_id); - if (!payment_ids.empty()) node.add_child("payment_ids", monero_utils::to_property_tree(payment_ids)); + if (is_outgoing != boost::none) node.put("isOutgoing", *is_outgoing); + if (is_incoming != boost::none) node.put("isIncoming", *is_incoming); + if (!tx_ids.empty()) node.add_child("txIds", monero_utils::to_property_tree(tx_ids)); + if (has_payment_id != boost::none) node.put("hasPaymentId", *has_payment_id); + if (!payment_ids.empty()) node.add_child("paymentIds", monero_utils::to_property_tree(payment_ids)); if (height != boost::none) node.put("height", *height); - if (min_height != boost::none) node.put("min_height", *min_height); - if (max_height != boost::none) node.put("max_height", *max_height); - if (include_outputs != boost::none) node.put("include_outputs", *include_outputs); - if (transfer_request != boost::none) node.add_child("transfer_request", (*transfer_request)->to_property_tree()); + if (min_height != boost::none) node.put("minHeight", *min_height); + if (max_height != boost::none) node.put("maxHeight", *max_height); + if (include_outputs != boost::none) node.put("includeOutputs", *include_outputs); + if (transfer_request != boost::none) node.add_child("transferRequest", (*transfer_request)->to_property_tree()); return node; } @@ -311,8 +311,8 @@ namespace monero { boost::property_tree::ptree monero_transfer::to_property_tree() const { boost::property_tree::ptree node; if (amount != boost::none) node.put("amount", *amount); - if (account_index != boost::none) node.put("account_index", *account_index); - if (num_suggested_confirmations != boost::none) node.put("num_suggested_confirmations", *num_suggested_confirmations); + if (account_index != boost::none) node.put("accountIndex", *account_index); + if (num_suggested_confirmations != boost::none) node.put("numSuggestedConfirmations", *num_suggested_confirmations); return node; } @@ -357,7 +357,7 @@ namespace monero { boost::property_tree::ptree monero_incoming_transfer::to_property_tree() const { boost::property_tree::ptree node = monero_transfer::to_property_tree(); - if (subaddress_index != boost::none) node.put("subaddress_index", *subaddress_index); + if (subaddress_index != boost::none) node.put("subaddressIndex", *subaddress_index); if (address != boost::none) node.put("address", *address); return node; } @@ -387,7 +387,7 @@ namespace monero { boost::property_tree::ptree monero_outgoing_transfer::to_property_tree() const { boost::property_tree::ptree node = monero_transfer::to_property_tree(); - if (!subaddress_indices.empty()) node.add_child("subaddress_indices", monero_utils::to_property_tree(subaddress_indices)); + if (!subaddress_indices.empty()) node.add_child("subaddressIndices", monero_utils::to_property_tree(subaddress_indices)); if (!addresses.empty()) node.add_child("addresses", monero_utils::to_property_tree(addresses)); if (!destinations.empty()) node.add_child("destinations", monero_utils::to_property_tree(destinations)); return node; @@ -438,11 +438,11 @@ namespace monero { boost::property_tree::ptree monero_transfer_request::to_property_tree() const { boost::property_tree::ptree node = monero_transfer::to_property_tree(); - if (getIsIncoming() != boost::none) node.put("is_incoming", *getIsIncoming()); + if (getIsIncoming() != boost::none) node.put("isIncoming", *getIsIncoming()); if (address != boost::none) node.put("address", *address); - if (subaddress_index != boost::none) node.put("subaddress_index", *subaddress_index); - if (has_destinations != boost::none) node.put("has_destinations", *has_destinations); - if (!subaddress_indices.empty()) node.add_child("subaddress_indices", monero_utils::to_property_tree(subaddress_indices)); + if (subaddress_index != boost::none) node.put("subaddressIndex", *subaddress_index); + if (has_destinations != boost::none) node.put("hasDestinations", *has_destinations); + if (!subaddress_indices.empty()) node.add_child("subaddressIndices", monero_utils::to_property_tree(subaddress_indices)); if (!addresses.empty()) node.add_child("addresses", monero_utils::to_property_tree(addresses)); if (!destinations.empty()) node.add_child("destinations", monero_utils::to_property_tree(destinations)); return node; @@ -545,11 +545,11 @@ namespace monero { boost::property_tree::ptree monero_output_wallet::to_property_tree() const { boost::property_tree::ptree node = monero_output::to_property_tree(); - if (account_index != boost::none) node.put("account_index", *account_index); - if (subaddress_index != boost::none) node.put("subaddress_index", *subaddress_index); - if (is_spent != boost::none) node.put("is_spent", *is_spent); - if (is_unlocked != boost::none) node.put("is_unlocked", *is_unlocked); - if (is_frozen != boost::none) node.put("is_frozen", *is_frozen); + if (account_index != boost::none) node.put("accountIndex", *account_index); + if (subaddress_index != boost::none) node.put("subaddressIndex", *subaddress_index); + if (is_spent != boost::none) node.put("isSpent", *is_spent); + if (is_unlocked != boost::none) node.put("isUnlocked", *is_unlocked); + if (is_frozen != boost::none) node.put("isFrozen", *is_frozen); return node; } @@ -585,7 +585,7 @@ namespace monero { boost::property_tree::ptree monero_output_request::to_property_tree() const { boost::property_tree::ptree node = monero_output_wallet::to_property_tree(); - if (!subaddress_indices.empty()) node.add_child("subaddress_indices", monero_utils::to_property_tree(subaddress_indices)); + if (!subaddress_indices.empty()) node.add_child("subaddressIndices", monero_utils::to_property_tree(subaddress_indices)); return node; } @@ -620,20 +620,20 @@ namespace monero { boost::property_tree::ptree monero_send_request::to_property_tree() const { boost::property_tree::ptree node; if (!destinations.empty()) node.add_child("destinations", monero_utils::to_property_tree(destinations)); - if (payment_id != boost::none) node.put("payment_id", *payment_id); + if (payment_id != boost::none) node.put("paymentId", *payment_id); if (priority != boost::none) node.put("priority", *priority); if (mixin != boost::none) node.put("mixin", *mixin); - if (ring_size != boost::none) node.put("ring_size", *ring_size); - if (account_index != boost::none) node.put("account_index", *account_index); - if (!subaddress_indices.empty()) node.add_child("subaddress_indices", monero_utils::to_property_tree(subaddress_indices)); - if (unlock_time != boost::none) node.put("unlock_time", *unlock_time); - if (can_split != boost::none) node.put("can_split", *can_split); - if (do_not_relay != boost::none) node.put("do_not_relay", *do_not_relay); + if (ring_size != boost::none) node.put("ringSize", *ring_size); + if (account_index != boost::none) node.put("accountIndex", *account_index); + if (!subaddress_indices.empty()) node.add_child("subaddressIndices", monero_utils::to_property_tree(subaddress_indices)); + if (unlock_time != boost::none) node.put("unlockTime", *unlock_time); + if (can_split != boost::none) node.put("canSplit", *can_split); + if (do_not_relay != boost::none) node.put("doNotRelay", *do_not_relay); if (note != boost::none) node.put("note", *note); - if (recipient_name != boost::none) node.put("recipient_name", *recipient_name); - if (below_amount != boost::none) node.put("below_amount", *below_amount); - if (sweep_each_subaddress != boost::none) node.put("sweep_each_subaddress", *sweep_each_subaddress); - if (key_image != boost::none) node.put("key_image", *key_image); + if (recipient_name != boost::none) node.put("recipientName", *recipient_name); + if (below_amount != boost::none) node.put("belowAmount", *below_amount); + if (sweep_each_subaddress != boost::none) node.put("sweepEachSubaddress", *sweep_each_subaddress); + if (key_image != boost::none) node.put("keyImage", *key_image); return node; } @@ -641,9 +641,9 @@ namespace monero { boost::property_tree::ptree monero_integrated_address::to_property_tree() const { boost::property_tree::ptree node; - node.put("standard_address", standard_address); - node.put("payment_id", payment_id); - node.put("integrated_address", integrated_address); + node.put("standardAddress", standard_address); + node.put("paymentId", payment_id); + node.put("integratedAddress", integrated_address); return node; } @@ -652,8 +652,8 @@ namespace monero { boost::property_tree::ptree monero_key_image_import_result::to_property_tree() const { boost::property_tree::ptree node; if (height != boost::none) node.put("height", *height); - if (spent_amount != boost::none) node.put("spent_amount", *spent_amount); - if (unspent_amount != boost::none) node.put("unspent_amount", *unspent_amount); + if (spent_amount != boost::none) node.put("spentAmount", *spent_amount); + if (unspent_amount != boost::none) node.put("unspentAmount", *unspent_amount); return node; } @@ -669,9 +669,9 @@ namespace monero { boost::property_tree::ptree monero_check_tx::to_property_tree() const { boost::property_tree::ptree node = monero_check::to_property_tree();; - if (in_tx_pool != boost::none) node.put("in_tx_pool", *in_tx_pool); - if (num_confirmations != boost::none) node.put("num_confirmations", *num_confirmations); - if (received_amount != boost::none) node.put("received_amount", *received_amount); + if (in_tx_pool != boost::none) node.put("inTxPool", *in_tx_pool); + if (num_confirmations != boost::none) node.put("numConfirmations", *num_confirmations); + if (received_amount != boost::none) node.put("receivedAmount", *received_amount); return node; } @@ -679,8 +679,8 @@ namespace monero { boost::property_tree::ptree monero_check_reserve::to_property_tree() const { boost::property_tree::ptree node = monero_check::to_property_tree(); - if (total_amount != boost::none) node.put("total_amount", *total_amount); - if (unconfirmed_spent_amount != boost::none) node.put("unconfirmed_spent_amount", *unconfirmed_spent_amount); + if (total_amount != boost::none) node.put("totalAmount", *total_amount); + if (unconfirmed_spent_amount != boost::none) node.put("unconfirmedSpentAmount", *unconfirmed_spent_amount); return node; } }