aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server_commands_defs.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-04-26 22:39:08 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-04-26 22:39:52 +0100
commit48ab3f93ff26769ee5b686562d768c547ff6478d (patch)
tree55c28543567bf2ff7714619018dcad408faf1350 /src/wallet/wallet_rpc_server_commands_defs.h
parentMerge pull request #816 (diff)
downloadmonero-48ab3f93ff26769ee5b686562d768c547ff6478d.tar.xz
wallet: add get_transfers rpc call
Allows getting in, out, pending, and failed transfers, similarly to the show_transfers command.
Diffstat (limited to 'src/wallet/wallet_rpc_server_commands_defs.h')
-rw-r--r--src/wallet/wallet_rpc_server_commands_defs.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h
index ebcc67923..9fe85dfc1 100644
--- a/src/wallet/wallet_rpc_server_commands_defs.h
+++ b/src/wallet/wallet_rpc_server_commands_defs.h
@@ -488,6 +488,66 @@ namespace wallet_rpc
};
};
+ struct COMMAND_RPC_GET_TRANSFERS
+ {
+ struct request
+ {
+ bool in;
+ bool out;
+ bool pending;
+ bool failed;
+ uint64_t min_height;
+ uint64_t max_height;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(in);
+ KV_SERIALIZE(out);
+ KV_SERIALIZE(pending);
+ KV_SERIALIZE(failed);
+ KV_SERIALIZE(min_height);
+ KV_SERIALIZE(max_height);
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct entry
+ {
+ std::string txid;
+ std::string payment_id;
+ uint64_t height;
+ uint64_t timestamp;
+ uint64_t amount;
+ uint64_t fee;
+ std::string note;
+ std::list<transfer_destination> destinations;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(txid);
+ KV_SERIALIZE(payment_id);
+ KV_SERIALIZE(height);
+ KV_SERIALIZE(timestamp);
+ KV_SERIALIZE(amount);
+ KV_SERIALIZE(fee);
+ KV_SERIALIZE(note);
+ KV_SERIALIZE(destinations);
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct response
+ {
+ std::list<entry> in;
+ std::list<entry> out;
+ std::list<entry> pending;
+ std::list<entry> failed;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(in);
+ KV_SERIALIZE(out);
+ KV_SERIALIZE(pending);
+ KV_SERIALIZE(failed);
+ END_KV_SERIALIZE_MAP()
+ };
+ };
+
}
}