diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-02-14 00:33:43 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-02-14 21:01:11 +0000 |
commit | 5c81a9f1a113e6932b019ba9f0d72b9ccd7cf743 (patch) | |
tree | 09cd51a2651bb6ac074309931b2992c1b35fb282 /src/wallet/wallet_rpc_server_commands_defs.h | |
parent | Merge pull request #4988 (diff) | |
download | monero-5c81a9f1a113e6932b019ba9f0d72b9ccd7cf743.tar.xz |
wallet_rpc_server: add a validate_address RPC
Diffstat (limited to 'src/wallet/wallet_rpc_server_commands_defs.h')
-rw-r--r-- | src/wallet/wallet_rpc_server_commands_defs.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h index f0c1a4e9d..8907b219a 100644 --- a/src/wallet/wallet_rpc_server_commands_defs.h +++ b/src/wallet/wallet_rpc_server_commands_defs.h @@ -47,7 +47,7 @@ // advance which version they will stop working with // Don't go over 32767 for any of these #define WALLET_RPC_VERSION_MAJOR 1 -#define WALLET_RPC_VERSION_MINOR 7 +#define WALLET_RPC_VERSION_MINOR 8 #define MAKE_WALLET_RPC_VERSION(major,minor) (((major)<<16)|(minor)) #define WALLET_RPC_VERSION MAKE_WALLET_RPC_VERSION(WALLET_RPC_VERSION_MAJOR, WALLET_RPC_VERSION_MINOR) namespace tools @@ -2189,5 +2189,40 @@ namespace wallet_rpc }; }; + struct COMMAND_RPC_VALIDATE_ADDRESS + { + struct request_t + { + std::string address; + bool any_net_type; + bool allow_openalias; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(address) + KV_SERIALIZE_OPT(any_net_type, false) + KV_SERIALIZE_OPT(allow_openalias, false) + END_KV_SERIALIZE_MAP() + }; + typedef epee::misc_utils::struct_init<request_t> request; + + struct response_t + { + bool valid; + bool integrated; + bool subaddress; + std::string nettype; + std::string openalias_address; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(valid) + KV_SERIALIZE(integrated) + KV_SERIALIZE(subaddress) + KV_SERIALIZE(nettype) + KV_SERIALIZE(openalias_address) + END_KV_SERIALIZE_MAP() + }; + typedef epee::misc_utils::struct_init<response_t> response; + }; + } } |