Generic safety cleanup (#22)

* create checksum system for versioning
* minor changes to CI
* dart ffi cleanup
* update checksums
This commit is contained in:
cyan
2024-07-30 17:46:55 +02:00
committed by GitHub
parent 3b9928a665
commit 373588247b
26 changed files with 375 additions and 20 deletions

View File

@@ -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) {

View File

@@ -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

View File

@@ -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