summaryrefslogtreecommitdiff
path: root/monero_libwallet2_api_c/src/main/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'monero_libwallet2_api_c/src/main/cpp')
-rw-r--r--monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp12
-rw-r--r--monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h1
2 files changed, 13 insertions, 0 deletions
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 8e12e23..c03e273 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
@@ -1709,6 +1709,18 @@ void* MONERO_WalletManager_createWalletFromKeys(void* wm_ptr, const char* path,
return reinterpret_cast<void*>(wallet);
}
+void* MONERO_WalletManager_createWalletFromDevice(void* wm_ptr, const char* path, const char* password, int nettype, const char* deviceName, uint64_t restoreHeight, const char* subaddressLookahead, const char* viewKeyString, const char* spendKeyString, uint64_t kdf_rounds) {
+ Monero::WalletManager *wm = reinterpret_cast<Monero::WalletManager*>(wm_ptr);
+ Monero::Wallet *wallet = wm->createWalletFromDevice(std::string(path),
+ std::string(password),
+ static_cast<Monero::NetworkType>(nettype),
+ std::string(deviceName),
+ restoreHeight,
+ std::string(subaddressLookahead),
+ kdf_rounds);
+ return reinterpret_cast<void*>(wallet);
+}
+
void* MONERO_WalletManager_createDeterministicWalletFromSpendKey(void* wm_ptr, const char* path, const char* password,
const char* language, int nettype, uint64_t restoreHeight,
const char* spendKeyString, uint64_t kdf_rounds) {
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 e714889..1bb3551 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
@@ -928,6 +928,7 @@ extern ADDAPI void* MONERO_WalletManager_createDeterministicWalletFromSpendKey(v
// const std::string &subaddressLookahead = "",
// uint64_t kdf_rounds = 1,
// WalletListener * listener = nullptr) = 0;
+extern ADDAPI void* MONERO_WalletManager_createWalletFromDevice(void* wm_ptr, const char* path, const char* password, int nettype, const char* deviceName, uint64_t restoreHeight, const char* subaddressLookahead, const char* viewKeyString, const char* spendKeyString, uint64_t kdf_rounds);
// virtual Wallet * createWalletFromPolyseed(const std::string &path,
// const std::string &password,
// NetworkType nettype,