diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-07-15 12:11:55 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-07-24 09:23:30 +0100 |
commit | ebf97d76f0020eb027175818ebbdafd6d578aa77 (patch) | |
tree | 5efd79bff6431a845b88f007bf4db783118ce272 /src/wallet/wallet_rpc_server_commands_defs.h | |
parent | Merge pull request #923 (diff) | |
download | monero-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.h | 65 |
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() + }; + }; + } } |