aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server_commands_defs.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-01-08 13:16:22 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-01-08 13:16:22 +0000
commit19c4041df56a2fa33b67b34698f5e37da1f500fc (patch)
tree6b8b01ab4e19b7902f072ad892734da049b2389f /src/wallet/wallet_rpc_server_commands_defs.h
parentMerge pull request #1487 (diff)
downloadmonero-19c4041df56a2fa33b67b34698f5e37da1f500fc.tar.xz
wallet_rpc_server: new RPC call to get a transfer by txid
Diffstat (limited to 'src/wallet/wallet_rpc_server_commands_defs.h')
-rw-r--r--src/wallet/wallet_rpc_server_commands_defs.h73
1 files changed, 48 insertions, 25 deletions
diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h
index 50b1613f9..ea0fc685f 100644
--- a/src/wallet/wallet_rpc_server_commands_defs.h
+++ b/src/wallet/wallet_rpc_server_commands_defs.h
@@ -525,6 +525,31 @@ namespace wallet_rpc
};
};
+ struct transfer_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;
+ std::string type;
+
+ 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);
+ KV_SERIALIZE(type);
+ END_KV_SERIALIZE_MAP()
+ };
+
struct COMMAND_RPC_GET_TRANSFERS
{
struct request
@@ -551,43 +576,41 @@ namespace wallet_rpc
END_KV_SERIALIZE_MAP()
};
- struct entry
+ struct response
+ {
+ std::list<transfer_entry> in;
+ std::list<transfer_entry> out;
+ std::list<transfer_entry> pending;
+ std::list<transfer_entry> failed;
+ std::list<transfer_entry> pool;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(in);
+ KV_SERIALIZE(out);
+ KV_SERIALIZE(pending);
+ KV_SERIALIZE(failed);
+ KV_SERIALIZE(pool);
+ END_KV_SERIALIZE_MAP()
+ };
+ };
+
+ struct COMMAND_RPC_GET_TRANSFER_BY_TXID
+ {
+ struct request
{
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;
- std::list<entry> pool;
+ transfer_entry transfer;
BEGIN_KV_SERIALIZE_MAP()
- KV_SERIALIZE(in);
- KV_SERIALIZE(out);
- KV_SERIALIZE(pending);
- KV_SERIALIZE(failed);
- KV_SERIALIZE(pool);
+ KV_SERIALIZE(transfer);
END_KV_SERIALIZE_MAP()
};
};