summaryrefslogtreecommitdiff
path: root/libbridge/src/main/cpp
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2024-01-07 14:38:45 +0100
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2024-01-07 14:38:45 +0100
commit74d93461682559a36eecb4b7b0e5728cd7f5389f (patch)
treef906afc584b0a6ccce2c71211d66fda20d53de20 /libbridge/src/main/cpp
parent54611055816001884a91c1760722de8c0af8b294 (diff)
view-only support
Diffstat (limited to 'libbridge/src/main/cpp')
-rw-r--r--libbridge/src/main/cpp/wallet2_api_c.cpp22
-rw-r--r--libbridge/src/main/cpp/wallet2_api_c.h1
2 files changed, 23 insertions, 0 deletions
diff --git a/libbridge/src/main/cpp/wallet2_api_c.cpp b/libbridge/src/main/cpp/wallet2_api_c.cpp
index 31f3bd4..95931fc 100644
--- a/libbridge/src/main/cpp/wallet2_api_c.cpp
+++ b/libbridge/src/main/cpp/wallet2_api_c.cpp
@@ -1428,6 +1428,28 @@ void* MONERO_WalletManager_recoveryWallet(const char* path, const char* password
std::string(seedOffset));
return reinterpret_cast<void*>(wallet);
}
+// virtual Wallet * createWalletFromKeys(const std::string &path,
+// const std::string &password,
+// const std::string &language,
+// NetworkType nettype,
+// uint64_t restoreHeight,
+// const std::string &addressString,
+// const std::string &viewKeyString,
+// const std::string &spendKeyString = "",
+// uint64_t kdf_rounds = 1) = 0;
+void* MONERO_WalletManager_createWalletFromKeys(const char* path, const char* password, const char* language, int nettype, uint64_t restoreHeight, const char* addressString, const char* viewKeyString, const char* spendKeyString, uint64_t kdf_rounds) {
+ Monero::Wallet *wallet =
+ Monero::WalletManagerFactory::getWalletManager()->createWalletFromKeys(
+ std::string(path),
+ std::string(password),
+ std::string(language),
+ static_cast<Monero::NetworkType>(nettype),
+ restoreHeight,
+ std::string(addressString),
+ std::string(viewKeyString),
+ std::string(spendKeyString));
+ return reinterpret_cast<void*>(wallet);
+}
void* MONERO_WalletManager_createWalletFromPolyseed(const char* path, const char* password,
int nettype, const char* mnemonic, const char* passphrase,
diff --git a/libbridge/src/main/cpp/wallet2_api_c.h b/libbridge/src/main/cpp/wallet2_api_c.h
index 27aa2e3..0f993c3 100644
--- a/libbridge/src/main/cpp/wallet2_api_c.h
+++ b/libbridge/src/main/cpp/wallet2_api_c.h
@@ -840,6 +840,7 @@ void* MONERO_WalletManager_recoveryWallet(const char* path, const char* password
// const std::string &viewKeyString,
// const std::string &spendKeyString = "",
// uint64_t kdf_rounds = 1) = 0;
+void* MONERO_WalletManager_createWalletFromKeys(const char* path, const char* password, const char* language, int nettype, uint64_t restoreHeight, const char* addressString, const char* viewKeyString, const char* spendKeyString, uint64_t kdf_rounds);
// Wallet * createWalletFromKeys(const std::string &path,
// const std::string &password,
// const std::string &language,