aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server_commands_defs.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-12-25 21:19:33 +0200
committerRiccardo Spagni <ric@spagni.net>2017-12-25 21:19:33 +0200
commitdb09247c6876d7af53eab2a399a42ca237e8c928 (patch)
treec509ec474e265dbde06df178492419ec4d92d5a4 /src/wallet/wallet_rpc_server_commands_defs.h
parentMerge pull request #2924 (diff)
parentAccount tagging (diff)
downloadmonero-db09247c6876d7af53eab2a399a42ca237e8c928.tar.xz
Merge pull request #2926
6b5bd129 Account tagging (stoffu)
Diffstat (limited to 'src/wallet/wallet_rpc_server_commands_defs.h')
-rw-r--r--src/wallet/wallet_rpc_server_commands_defs.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h
index 258894bc7..76c02039b 100644
--- a/src/wallet/wallet_rpc_server_commands_defs.h
+++ b/src/wallet/wallet_rpc_server_commands_defs.h
@@ -178,7 +178,10 @@ namespace wallet_rpc
{
struct request
{
+ std::string tag; // all accounts if empty, otherwise those accounts with this tag
+
BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(tag)
END_KV_SERIALIZE_MAP()
};
@@ -189,6 +192,7 @@ namespace wallet_rpc
uint64_t balance;
uint64_t unlocked_balance;
std::string label;
+ std::string tag;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(account_index)
@@ -196,6 +200,7 @@ namespace wallet_rpc
KV_SERIALIZE(balance)
KV_SERIALIZE(unlocked_balance)
KV_SERIALIZE(label)
+ KV_SERIALIZE(tag)
END_KV_SERIALIZE_MAP()
};
@@ -254,6 +259,95 @@ namespace wallet_rpc
};
};
+ struct COMMAND_RPC_GET_ACCOUNT_TAGS
+ {
+ struct request
+ {
+ BEGIN_KV_SERIALIZE_MAP()
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct account_tag_info
+ {
+ std::string tag;
+ std::string label;
+ std::vector<uint32_t> accounts;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(tag);
+ KV_SERIALIZE(label);
+ KV_SERIALIZE(accounts);
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct response
+ {
+ std::vector<account_tag_info> account_tags;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(account_tags)
+ END_KV_SERIALIZE_MAP()
+ };
+ };
+
+ struct COMMAND_RPC_TAG_ACCOUNTS
+ {
+ struct request
+ {
+ std::string tag;
+ std::set<uint32_t> accounts;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(tag)
+ KV_SERIALIZE(accounts)
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct response
+ {
+ BEGIN_KV_SERIALIZE_MAP()
+ END_KV_SERIALIZE_MAP()
+ };
+ };
+
+ struct COMMAND_RPC_UNTAG_ACCOUNTS
+ {
+ struct request
+ {
+ std::set<uint32_t> accounts;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(accounts)
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct response
+ {
+ BEGIN_KV_SERIALIZE_MAP()
+ END_KV_SERIALIZE_MAP()
+ };
+ };
+
+ struct COMMAND_RPC_SET_ACCOUNT_TAG_DESCRIPTION
+ {
+ struct request
+ {
+ std::string tag;
+ std::string description;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(tag)
+ KV_SERIALIZE(description)
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct response
+ {
+ BEGIN_KV_SERIALIZE_MAP()
+ END_KV_SERIALIZE_MAP()
+ };
+ };
+
struct COMMAND_RPC_GET_HEIGHT
{
struct request