summaryrefslogtreecommitdiff
path: root/wownero_libwallet2_api_c/src/main
diff options
context:
space:
mode:
authorcyan <cyjan@mrcyjanek.net>2024-07-30 17:46:55 +0200
committerGitHub <noreply@github.com>2024-07-30 17:46:55 +0200
commit373588247bcdb0ef2a16531fb8cd556743c5cd74 (patch)
treea26e5a4c08cd56b8e47a20cdc94306b0e7a3a01c /wownero_libwallet2_api_c/src/main
parent3b9928a665099f10cfd7e17f82cdf222e9f3ae27 (diff)
Generic safety cleanup (#22)
* create checksum system for versioning * minor changes to CI * dart ffi cleanup * update checksums
Diffstat (limited to 'wownero_libwallet2_api_c/src/main')
-rw-r--r--wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp16
-rw-r--r--wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h6
-rw-r--r--wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h8
3 files changed, 30 insertions, 0 deletions
diff --git a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp
index f29ca4e..361f650 100644
--- a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp
+++ b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp
@@ -6,6 +6,7 @@
#include <thread>
#include "../../../../wownero/src/wallet/api/wallet2_api.h"
#include "../../../../external/wownero-seed/include/wownero_seed/wownero_seed.hpp"
+#include "wownero_checksum.h"
#ifdef __cplusplus
extern "C"
@@ -1957,6 +1958,21 @@ void* WOWNERO_deprecated_create14WordSeed(char *path, char *password, char *lang
return reinterpret_cast<void*>(wallet);
}
+const char* WOWNERO_checksum_wallet2_api_c_h() {
+ return WOWNERO_wallet2_api_c_h_sha256;
+}
+const char* WOWNERO_checksum_wallet2_api_c_cpp() {
+ return WOWNERO_wallet2_api_c_cpp_sha256;
+}
+const char* WOWNERO_checksum_wallet2_api_c_exp() {
+ return WOWNERO_wallet2_api_c_exp_sha256;
+}
+int WOWNERO_checksum_wallet2_api_c_version() {
+ return WOWNERO_libwallet2_api_c_version;
+}
+const char* WOWNERO_checksum_wallet2_api_c_date() {
+ return WOWNERO_wallet2_api_c_date;
+}
// i hate windows
void WOWNERO_free(void* ptr) {
diff --git a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h
index 7219c10..8ccacab 100644
--- a/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h
+++ b/wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h
@@ -1012,6 +1012,12 @@ extern ADDAPI uint64_t WOWNERO_deprecated_14WordSeedHeight(char *seed);
extern ADDAPI void WOWNERO_free(void* ptr);
+extern ADDAPI const char* WOWNERO_checksum_wallet2_api_c_h();
+extern ADDAPI const char* WOWNERO_checksum_wallet2_api_c_cpp();
+extern ADDAPI const char* WOWNERO_checksum_wallet2_api_c_exp();
+extern ADDAPI int WOWNERO_checksum_wallet2_api_c_version();
+extern ADDAPI const char* WOWNERO_checksum_wallet2_api_c_date();
+
#ifdef __cplusplus
}
#endif \ No newline at end of file
diff --git a/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h b/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h
new file mode 100644
index 0000000..5b2cef9
--- /dev/null
+++ b/wownero_libwallet2_api_c/src/main/cpp/wownero_checksum.h
@@ -0,0 +1,8 @@
+#ifndef MONEROC_CHECKSUMS
+#define MONEROC_CHECKSUMS
+const char * WOWNERO_wallet2_api_c_h_sha256 = "1f4688b9ddacbc33e82426c50480ab8e3727718f59e577080a7dc6dca48bcf9d";
+const char * WOWNERO_wallet2_api_c_cpp_sha256 = "f2b818197f90711d938c17ce0513b110b1e2b4fe9765f54be7afa5a3b4ad8077";
+const char * WOWNERO_wallet2_api_c_exp_sha256 = "dd9874cc43a6a74bbfa3e49c4ad3f835ff22efd3de8f679cc91c4af3d931aedb";
+const int WOWNERO_libwallet2_api_c_version = 25;
+const char * WOWNERO_wallet2_api_c_date = "2024-07-30 15:13:50 +0000";
+#endif