mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 23:31:32 +02:00
add get_address_book_entries() stack w/o impl
This commit is contained in:
@@ -2790,6 +2790,10 @@ namespace monero {
|
||||
}
|
||||
}
|
||||
|
||||
vector<monero_address_book_entry> monero_wallet::get_address_book_entries(const vector<uint32_t>& indices) const {
|
||||
throw runtime_error("get_address_book_entries() not implemented");
|
||||
}
|
||||
|
||||
string monero_wallet::create_payment_uri(const monero_send_request& request) const {
|
||||
MTRACE("create_payment_uri()");
|
||||
|
||||
|
||||
@@ -1167,14 +1167,14 @@ namespace monero {
|
||||
*/
|
||||
void set_tx_notes(const vector<string>& tx_ids, const vector<string>& notes);
|
||||
|
||||
// /**
|
||||
// * Get all address book entries.
|
||||
// *
|
||||
// * @param indices are indices of the entries to get
|
||||
// * @return the address book entries
|
||||
// */
|
||||
// vector<monero_address_book_entry> get_address_book_entries(const vector<uint32_t>& indices) const;
|
||||
//
|
||||
/**
|
||||
* Get all address book entries.
|
||||
*
|
||||
* @param indices are indices of the entries to get
|
||||
* @return the address book entries
|
||||
*/
|
||||
vector<monero_address_book_entry> get_address_book_entries(const vector<uint32_t>& indices) const;
|
||||
|
||||
// /**
|
||||
// * Add an address book entry.
|
||||
// *
|
||||
|
||||
@@ -795,4 +795,15 @@ namespace monero {
|
||||
if (!m_tx_ids.empty()) node.add_child("txIds", monero_utils::to_property_tree(m_tx_ids));
|
||||
return node;
|
||||
}
|
||||
|
||||
// -------------------------- MONERO ADDRESS BOOK ---------------------------
|
||||
|
||||
boost::property_tree::ptree monero_address_book_entry::to_property_tree() const {
|
||||
boost::property_tree::ptree node;
|
||||
if (m_index != boost::none) node.put("index", *m_index);
|
||||
if (m_address != boost::none) node.put("address", *m_address);
|
||||
if (m_description != boost::none) node.put("description", *m_description);
|
||||
if (m_payment_id != boost::none) node.put("paymentId", *m_payment_id);
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,4 +443,16 @@ namespace monero {
|
||||
|
||||
boost::property_tree::ptree to_property_tree() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* Monero address book entry model.
|
||||
*/
|
||||
struct monero_address_book_entry : serializable_struct {
|
||||
boost::optional<uint32_t> m_index;
|
||||
boost::optional<string> m_address;
|
||||
boost::optional<string> m_description;
|
||||
boost::optional<string> m_payment_id;
|
||||
|
||||
boost::property_tree::ptree to_property_tree() const;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user