mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-18 07:41:32 +02:00
define MoneroKeyImageImportResult and importKeyImages()
This commit is contained in:
@@ -1089,6 +1089,11 @@ namespace monero {
|
||||
return keyImages;
|
||||
}
|
||||
|
||||
shared_ptr<MoneroKeyImageImportResult> MoneroWallet::importKeyImages(const vector<MoneroKeyImage>& keyImages) {
|
||||
cout << "MoneroWalelt::importKeyImages()" << endl;
|
||||
throw runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
vector<shared_ptr<MoneroTxWallet>> MoneroWallet::sendSplit(const MoneroSendRequest& request) {
|
||||
cout << "MoneroWallet::sendSplit(request)" << endl;
|
||||
cout << "MoneroSendRequest: " << request.serialize() << endl;
|
||||
|
||||
@@ -582,14 +582,14 @@ namespace monero {
|
||||
*/
|
||||
vector<shared_ptr<MoneroKeyImage>> getKeyImages() const;
|
||||
|
||||
// /**
|
||||
// * Import signed key images and verify their spent status.
|
||||
// *
|
||||
// * @param keyImages are key images to import and verify (requires hex and signature)
|
||||
// * @return results of the import
|
||||
// */
|
||||
// public MoneroKeyImageImportResult importKeyImages(List<MoneroKeyImage> keyImages);
|
||||
//
|
||||
/**
|
||||
* Import signed key images and verify their spent status.
|
||||
*
|
||||
* @param keyImages are key images to import and verify (requires hex and signature)
|
||||
* @return results of the import
|
||||
*/
|
||||
shared_ptr<MoneroKeyImageImportResult> importKeyImages(const vector<MoneroKeyImage>& keyImages);
|
||||
|
||||
// /**
|
||||
// * Get new key images from the last imported outputs.
|
||||
// *
|
||||
|
||||
@@ -389,7 +389,7 @@ namespace monero {
|
||||
return node;
|
||||
}
|
||||
|
||||
// -------------------------- MONERO INTEGRATED ADDRESS -----------------------------
|
||||
// ---------------------- MONERO INTEGRATED ADDRESS -------------------------
|
||||
|
||||
boost::property_tree::ptree MoneroIntegratedAddress::toPropertyTree() const {
|
||||
boost::property_tree::ptree node;
|
||||
@@ -398,4 +398,14 @@ namespace monero {
|
||||
node.put("integratedAddress", integratedAddress);
|
||||
return node;
|
||||
}
|
||||
|
||||
// -------------------- MONERO KEY IMAGE IMPORT RESULT ----------------------
|
||||
|
||||
boost::property_tree::ptree MoneroKeyImageImportResult::toPropertyTree() const {
|
||||
boost::property_tree::ptree node;
|
||||
if (height != boost::none) node.put("height", *height);
|
||||
if (spentAmount != boost::none) node.put("spentAmount", *spentAmount);
|
||||
if (unspentAmount != boost::none) node.put("unspentAmount", *unspentAmount);
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,4 +254,15 @@ namespace monero {
|
||||
|
||||
boost::property_tree::ptree toPropertyTree() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* Models results from importing key images.
|
||||
*/
|
||||
struct MoneroKeyImageImportResult : public SerializableStruct {
|
||||
boost::optional<uint64_t> height;
|
||||
boost::optional<uint64_t> spentAmount;
|
||||
boost::optional<uint64_t> unspentAmount;
|
||||
|
||||
boost::property_tree::ptree toPropertyTree() const;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user