summaryrefslogtreecommitdiff
path: root/monero_libwallet2_api_c
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 /monero_libwallet2_api_c
parent3b9928a665099f10cfd7e17f82cdf222e9f3ae27 (diff)
Generic safety cleanup (#22)
* create checksum system for versioning * minor changes to CI * dart ffi cleanup * update checksums
Diffstat (limited to 'monero_libwallet2_api_c')
-rw-r--r--monero_libwallet2_api_c/monero_libwallet2_api_c.exp5
-rw-r--r--monero_libwallet2_api_c/src/main/cpp/monero_checksum.h8
-rw-r--r--monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp17
-rw-r--r--monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h7
4 files changed, 36 insertions, 1 deletions
diff --git a/monero_libwallet2_api_c/monero_libwallet2_api_c.exp b/monero_libwallet2_api_c/monero_libwallet2_api_c.exp
index 6765302..76110a8 100644
--- a/monero_libwallet2_api_c/monero_libwallet2_api_c.exp
+++ b/monero_libwallet2_api_c/monero_libwallet2_api_c.exp
@@ -304,3 +304,8 @@ _MONERO_cw_WalletListener_isNewTransactionExist
_MONERO_cw_WalletListener_resetIsNewTransactionExist
_MONERO_cw_WalletListener_height
_MONERO_free
+_MONERO_checksum_wallet2_api_c_h
+_MONERO_checksum_wallet2_api_c_cpp
+_MONERO_checksum_wallet2_api_c_exp
+_MONERO_checksum_wallet2_api_c_version
+_MONERO_checksum_wallet2_api_c_date \ No newline at end of file
diff --git a/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h b/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h
new file mode 100644
index 0000000..9bbbf77
--- /dev/null
+++ b/monero_libwallet2_api_c/src/main/cpp/monero_checksum.h
@@ -0,0 +1,8 @@
+#ifndef MONEROC_CHECKSUMS
+#define MONEROC_CHECKSUMS
+const char * MONERO_wallet2_api_c_h_sha256 = "b9c712f59873da33dfc4c9caa4850ee5cba4bf7310179dfc33af9d3029d9855a";
+const char * MONERO_wallet2_api_c_cpp_sha256 = "7edf0905802faa48f66362a6d2ebf25f458107b67cd4abc6d01886c40f5634ef";
+const char * MONERO_wallet2_api_c_exp_sha256 = "bfac0ee584f50bd9263ae453103530c2594b21aec8ae7622e8c192c027f5d6af";
+const int MONERO_libwallet2_api_c_version = 48;
+const char * MONERO_wallet2_api_c_date = "2024-07-30 15:06:42 +0000";
+#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 7fd79e9..0214f3b 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
@@ -5,7 +5,7 @@
#include <cstring>
#include <thread>
#include "../../../../monero/src/wallet/api/wallet2_api.h"
-
+#include "monero_checksum.h"
#ifdef __cplusplus
extern "C"
@@ -2020,6 +2020,21 @@ uint64_t MONERO_cw_WalletListener_height(void* cw_walletListener_ptr) {
return listener->cw_isNeedToRefresh();
};
+const char* MONERO_checksum_wallet2_api_c_h() {
+ return MONERO_wallet2_api_c_h_sha256;
+}
+const char* MONERO_checksum_wallet2_api_c_cpp() {
+ return MONERO_wallet2_api_c_cpp_sha256;
+}
+const char* MONERO_checksum_wallet2_api_c_exp() {
+ return MONERO_wallet2_api_c_exp_sha256;
+}
+int MONERO_checksum_wallet2_api_c_version() {
+ return MONERO_libwallet2_api_c_version;
+}
+const char* MONERO_checksum_wallet2_api_c_date() {
+ return MONERO_wallet2_api_c_date;
+}
// i hate windows
void MONERO_free(void* 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 14c658f..3ba0a95 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
@@ -10,6 +10,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <unistd.h>
+#include "monero_checksum.h"
#ifdef __cplusplus
extern "C"
@@ -1032,6 +1033,12 @@ extern ADDAPI uint64_t MONERO_cw_WalletListener_height(void* cw_walletListener_p
extern ADDAPI void MONERO_free(void* ptr);
+extern ADDAPI const char* MONERO_checksum_wallet2_api_c_h();
+extern ADDAPI const char* MONERO_checksum_wallet2_api_c_cpp();
+extern ADDAPI const char* MONERO_checksum_wallet2_api_c_exp();
+extern ADDAPI int MONERO_checksum_wallet2_api_c_version();
+extern ADDAPI const char* MONERO_checksum_wallet2_api_c_date();
+
#ifdef __cplusplus
}
#endif \ No newline at end of file