define MoneroSendPriority, MoneroSendRequest;

define sendTxs()
This commit is contained in:
woodser
2019-06-27 14:40:38 -04:00
parent ebc5101289
commit 8f4fa6d44f
4 changed files with 57 additions and 9 deletions
+5
View File
@@ -852,6 +852,11 @@ namespace monero {
return vouts;
}
vector<shared_ptr<MoneroTxWallet>> MoneroWallet::sendTxs(const MoneroSendRequest& request) {
cout << "MoneroWallet::sendTxs(request)" << endl;
throw runtime_error("not implemented");
}
void MoneroWallet::save() {
cout << "save()" << endl;
save("", "");
+10 -9
View File
@@ -596,15 +596,16 @@ namespace monero {
// * @return the key images from the last imported outputs
// */
// public List<MoneroKeyImage> getNewKeyImagesFromLastImport();
//
// /**
// * Create and relay (depending on configuration) a transaction which
// * transfers funds from this wallet to one or more destination addresses.
// *
// * @param request configures the transaction
// * @return the resulting transaction
// */
// public MoneroTxWallet send(MoneroSendRequest request);
/**
* Create one or more transactions which transfer funds from this wallet to
* one or more destinations depending on the given configuration.
*
* @param request configures the transaction
* @return the resulting transaction
*/
vector<shared_ptr<MoneroTxWallet>> sendTxs(const MoneroSendRequest& request);
//
// /**
// * Create and relay a transaction which transfers funds from this wallet to
+6
View File
@@ -371,6 +371,12 @@ namespace monero {
return true;
}
// ------------------------- MONERO SEND REQUEST ----------------------------
boost::property_tree::ptree MoneroSendRequest::toPropertyTree() const {
throw runtime_error("MoneroSendRequest::toPropertyTree() not implemented");
}
// -------------------------- MONERO INTEGRATED ADDRESS -----------------------------
boost::property_tree::ptree MoneroIntegratedAddress::toPropertyTree() const {
+36
View File
@@ -218,4 +218,40 @@ namespace monero {
boost::property_tree::ptree toPropertyTree() const;
};
/**
* Enumerates Monero network types.
*/
enum MoneroSendPriority : uint8_t {
DEFAULT = 0,
UNIMPORTANT,
NORMAL,
ELEVATED
};
/**
* Configures a request to send/sweep funds or create a payment URI.
*
* TODO: allow setAddress(), setAmount() for default destination?
*/
struct MoneroSendRequest : public SerializableStruct {
vector<shared_ptr<MoneroDestination>> destinations;
boost::optional<string> paymentId;
boost::optional<MoneroSendPriority> priority;
boost::optional<uint32_t> mixin;
boost::optional<uint32_t> ringSize;
boost::optional<uint64_t> fee;
boost::optional<uint32_t> accountIndex;
vector<uint32_t> subaddressIndices;
boost::optional<uint64_t> unlockTime;
boost::optional<bool> canSplit;
boost::optional<bool> doNotRelay;
boost::optional<string> note;
boost::optional<string> recipientName;
boost::optional<uint64_t> belowAmount;
boost::optional<bool> sweepEachSubaddress;
boost::optional<string> keyImage;
boost::property_tree::ptree toPropertyTree() const;
};
}