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-07-15 12:11:55 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-07-24 09:23:30 +0100
commitebf97d76f0020eb027175818ebbdafd6d578aa77 (patch)
tree5efd79bff6431a845b88f007bf4db783118ce272 /src/wallet/wallet_rpc_server_commands_defs.h
parentMerge pull request #923 (diff)
downloadmonero-ebf97d76f0020eb027175818ebbdafd6d578aa77.tar.xz
wallet: new {ex,im}port_key_images commands and RPC calls
They are used to export a signed set of key images from a wallet with a private spend key, so an auditor with the matching view key may see which of those are spent, and which are not.
Diffstat (limited to 'src/wallet/wallet_rpc_server_commands_defs.h')
-rw-r--r--src/wallet/wallet_rpc_server_commands_defs.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h
index f4eefcd1a..d7f01d9ee 100644
--- a/src/wallet/wallet_rpc_server_commands_defs.h
+++ b/src/wallet/wallet_rpc_server_commands_defs.h
@@ -601,5 +601,70 @@ namespace wallet_rpc
};
};
+ struct COMMAND_RPC_EXPORT_KEY_IMAGES
+ {
+ struct request
+ {
+ BEGIN_KV_SERIALIZE_MAP()
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct signed_key_image
+ {
+ std::string key_image;
+ std::string signature;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(key_image);
+ KV_SERIALIZE(signature);
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct response
+ {
+ std::vector<signed_key_image> signed_key_images;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(signed_key_images);
+ END_KV_SERIALIZE_MAP()
+ };
+ };
+
+ struct COMMAND_RPC_IMPORT_KEY_IMAGES
+ {
+ struct signed_key_image
+ {
+ std::string key_image;
+ std::string signature;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(key_image);
+ KV_SERIALIZE(signature);
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct request
+ {
+ std::vector<signed_key_image> signed_key_images;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(signed_key_images);
+ END_KV_SERIALIZE_MAP()
+ };
+
+ struct response
+ {
+ uint64_t height;
+ uint64_t spent;
+ uint64_t unspent;
+
+ BEGIN_KV_SERIALIZE_MAP()
+ KV_SERIALIZE(height)
+ KV_SERIALIZE(spent)
+ KV_SERIALIZE(unspent)
+ END_KV_SERIALIZE_MAP()
+ };
+ };
+
}
}