aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server_commands_defs.h
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2014-06-17 18:15:21 -0400
committerThomas Winget <tewinget@gmail.com>2014-06-30 07:16:50 -0400
commitd433a696e527a01c1cbef48495652335140f0bb2 (patch)
tree809d9095b3cbeff9b4c4f643e39026820e32c8f8 /src/wallet/wallet_rpc_server_commands_defs.h
parentremoved erroneous printing of newlines (diff)
downloadmonero-d433a696e527a01c1cbef48495652335140f0bb2.tar.xz
wallet RPC converted to use new transaction semantics
wallet RPC now uses wallet2::create_transactions and wallet2::commit_tx instead of wallet2::transfer. This made it possible to add the RPC call /transfer_split, which will split transactions automatically if they are too large. The old call to /transfer will return an error stating to use /transfer_split if multiple transactions are needed to fulfill the request.
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet_rpc_server_commands_defs.h (renamed from src/wallet/wallet_rpc_server_commans_defs.h)33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/wallet/wallet_rpc_server_commans_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h
index 7ffbcfc18..33130da06 100644
--- a/src/wallet/wallet_rpc_server_commans_defs.h
+++ b/src/wallet/wallet_rpc_server_commands_defs.h
@@ -52,7 +52,7 @@ namespace wallet_rpc
};
};
- struct trnsfer_destination
+ struct transfer_destination
{
uint64_t amount;
std::string address;
@@ -66,7 +66,7 @@ namespace wallet_rpc
{
struct request
{
- std::list<trnsfer_destination> destinations;
+ std::list<transfer_destination> destinations;
uint64_t fee;
uint64_t mixin;
uint64_t unlock_time;
@@ -91,6 +91,35 @@ namespace wallet_rpc
};
};
+ struct COMMAND_RPC_TRANSFER_SPLIT
+ {
+ struct request
+ {
+ std::list<transfer_destination> destinations;
+ uint64_t fee;
+ uint64_t mixin;
+ uint64_t unlock_time;
+ std::string payment_id;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(destinations)
+ KV_SERIALIZE(fee)
+ KV_SERIALIZE(mixin)
+ KV_SERIALIZE(unlock_time)
+ KV_SERIALIZE(payment_id)
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct response
+ {
+ std::list<std::string> tx_hash_list;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(tx_hash_list)
+ END_KV_SERIALIZE_MAP()
+ };
+ };
+
struct COMMAND_RPC_STORE
{
struct request