diff options
Diffstat (limited to 'src/wallet/wallet_rpc_server_commands_defs.h')
-rw-r--r-- | src/wallet/wallet_rpc_server_commands_defs.h | 73 |
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() }; }; |