diff options
Diffstat (limited to 'monero_libwallet2_api_c/src/main')
| -rw-r--r-- | monero_libwallet2_api_c/src/main/cpp/monero_checksum.h | 4 | ||||
| -rw-r--r-- | monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp | 11 | ||||
| -rw-r--r-- | monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h | 4 |
3 files changed, 12 insertions, 7 deletions
diff --git a/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h b/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h index 20cbeae..5a9d56e 100644 --- a/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h +++ b/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h @@ -1,6 +1,6 @@ #ifndef MONEROC_CHECKSUMS #define MONEROC_CHECKSUMS -const char * MONERO_wallet2_api_c_h_sha256 = "e8db0ef0324a153f5e3ecca4c0db23c54f4576e84988f04bd4f11c1142f9d7ad"; -const char * MONERO_wallet2_api_c_cpp_sha256 = "dca52ac9ee009fda9fb5726543a454885e61d8eb74fb33112288029ed625bec5-b089f9ee69924882c5d14dd1a6991deb05d9d1cd"; +const char * MONERO_wallet2_api_c_h_sha256 = "198a27486ce4f014b737f52ec2879a90838c3b3ca088de8dc7d55b79a10f4a5b"; +const char * MONERO_wallet2_api_c_cpp_sha256 = "22b0c9dd542fb55edfe9e17da67e97ddf5f80bcdd3e126e1bd64cce54234bde1-b089f9ee69924882c5d14dd1a6991deb05d9d1cd"; const char * MONERO_wallet2_api_c_exp_sha256 = "c8913ac41068f67b57c9b0a3c7dd8973e3c1273b66c2ff0aadb0003931da748c"; #endif diff --git a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp index 407d700..0cc2f9f 100644 --- a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp +++ b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp @@ -1767,10 +1767,15 @@ bool MONERO_WalletManager_verifyWalletPassword(void* wm_ptr, const char* keys_fi Monero::WalletManager *wm = reinterpret_cast<Monero::WalletManager*>(wm_ptr); return wm->verifyWalletPassword(std::string(keys_file_name), std::string(password), no_spend_key, kdf_rounds); } + // virtual bool queryWalletDevice(Wallet::Device& device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds = 1) const = 0; -// bool MONERO_WalletManager_queryWalletDevice(int device_type, const char* keys_file_name, const char* password, uint64_t kdf_rounds) { -// return Monero::WalletManagerFactory::getWalletManager()->queryWalletDevice(device_type, std::string(keys_file_name), std::string(password), kdf_rounds); -//} +int MONERO_WalletManager_queryWalletDevice(void* wm_ptr, const char* keys_file_name, const char* password, uint64_t kdf_rounds) { + Monero::WalletManager *wm = reinterpret_cast<Monero::WalletManager*>(wm_ptr); + Monero::Wallet::Device device_type; + wm->queryWalletDevice(device_type, std::string(keys_file_name), std::string(password), kdf_rounds); + return device_type; +} + // virtual std::vector<std::string> findWallets(const std::string &path) = 0; const char* MONERO_WalletManager_findWallets(void* wm_ptr, const char* path, const char* separator) { Monero::WalletManager *wm = reinterpret_cast<Monero::WalletManager*>(wm_ptr); diff --git a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h index 6e691c8..143da40 100644 --- a/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h +++ b/monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h @@ -948,7 +948,7 @@ extern ADDAPI bool MONERO_WalletManager_walletExists(void* wm_ptr, const char* p // virtual bool verifyWalletPassword(const std::string &keys_file_name, const std::string &password, bool no_spend_key, uint64_t kdf_rounds = 1) const = 0; extern ADDAPI bool MONERO_WalletManager_verifyWalletPassword(void* wm_ptr, const char* keys_file_name, const char* password, bool no_spend_key, uint64_t kdf_rounds); // virtual bool queryWalletDevice(Wallet::Device& device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds = 1) const = 0; -extern ADDAPI bool MONERO_WalletManager_queryWalletDevice(int device_type, const char* keys_file_name, const char* password, uint64_t kdf_rounds); +extern ADDAPI int MONERO_WalletManager_queryWalletDevice(void* wm_ptr, const char* keys_file_name, const char* password, uint64_t kdf_rounds); // virtual std::vector<std::string> findWallets(const std::string &path) = 0; extern ADDAPI const char* MONERO_WalletManager_findWallets(void* wm_ptr, const char* path, const char* separator); // virtual std::string errorString() const = 0; @@ -1039,4 +1039,4 @@ extern ADDAPI const char* MONERO_checksum_wallet2_api_c_exp(); #ifdef __cplusplus } -#endif
\ No newline at end of file +#endif |
