diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ad064db..232e912 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,8 +3,15 @@ FROM ghcr.io/cirruslabs/flutter:3.22.2 # Install dependencies +# lintinfo5 + +RUN wget http://mirrors.kernel.org/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb -O libtinfo5.deb \ + && apt install ./libtinfo5.deb \ + && rm libtinfo5.deb + RUN apt update \ - && apt install -y wget build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gcc-mingw-w64-i686 g++-mingw-w64-i686 build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf unzip python-is-python3 build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-i686-linux-gnu g++-i686-linux-gnu pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf python-is-python3 zsh + && apt install -y wget build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo6 gperf gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gcc-mingw-w64-i686 g++-mingw-w64-i686 build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf unzip python-is-python3 build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-i686-linux-gnu g++-i686-linux-gnu pkg-config autoconf libtool ccache make cmake gcc g++ git curl lbzip2 libtinfo5 gperf python-is-python3 zsh llvm libclang1-18 libc++-18-dev clang + RUN bash -c 'if [[ "$(uname -m)" == "aarch64" || "$(uname -m)" == "arm64" ]] then sudo rm -rf /opt/android-sdk-linux/platform-tools; fi' diff --git a/.github/workflows/cake_wallet.yaml b/.github/workflows/cake_wallet.yaml index 7f129c0..f4bc462 100644 --- a/.github/workflows/cake_wallet.yaml +++ b/.github/workflows/cake_wallet.yaml @@ -1,7 +1,5 @@ name: Build cake_wallet for android -on: - pull_request: - types: [opened, reopened, synchronize] +on: [push] permissions: issues: write pull-requests: write diff --git a/.github/workflows/checksum.yaml b/.github/workflows/checksum.yaml new file mode 100644 index 0000000..fc51211 --- /dev/null +++ b/.github/workflows/checksum.yaml @@ -0,0 +1,37 @@ +name: Check if checksums are in sync +on: [push] +permissions: + issues: write + pull-requests: write +jobs: + android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + - uses: 8BitJonny/gh-get-current-pr@3.0.0 + id: PR + - uses: subosito/flutter-action@v2 + with: + channel: stable + - name: generate checksums + run: | + ./generate_checksum.sh + - name: check if git tree is clean + run: | + if [ -z "$(git status --porcelain)" ]; then + exit 0 + else + exit 1 + fi + - name: Create or update comment + continue-on-error: true + if: failure() + uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ github.event.pull_request.number }} + body: | + Invalid checksums, please run `./generate_checksum.sh` + \ No newline at end of file diff --git a/.github/workflows/dart_bindings.yaml b/.github/workflows/dart_bindings.yaml index a1e7984..6ea5567 100644 --- a/.github/workflows/dart_bindings.yaml +++ b/.github/workflows/dart_bindings.yaml @@ -1,7 +1,5 @@ name: Check if dart bindings are in sync -on: - pull_request: - types: [opened, reopened, synchronize] +on: [push] permissions: issues: write pull-requests: write @@ -30,6 +28,7 @@ jobs: exit 1 fi - name: Create or update comment + continue-on-error: true if: failure() uses: peter-evans/create-or-update-comment@v4 with: diff --git a/.github/workflows/xmruw.yaml b/.github/workflows/xmruw.yaml index 95f42ea..fd34933 100644 --- a/.github/workflows/xmruw.yaml +++ b/.github/workflows/xmruw.yaml @@ -1,11 +1,5 @@ -name: Build - - - - -on: - pull_request: - types: [opened, reopened, synchronize] +name: Build xmruw +on: [push] permissions: issues: write pull-requests: write diff --git a/apply_patches.sh b/apply_patches.sh index e8e090e..3ce6856 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -1,4 +1,7 @@ #!/bin/bash + +cd "$(realpath $(dirname $0))" + repo="$1" if [[ "x$repo" == "x" ]]; diff --git a/build_single.sh b/build_single.sh index cb8979a..d98af2a 100755 --- a/build_single.sh +++ b/build_single.sh @@ -1,5 +1,7 @@ #!/bin/bash +cd "$(realpath $(dirname $0))" + function verbose_copy() { echo "==> cp $1 $2" cp $1 $2 diff --git a/generate_checksum.sh b/generate_checksum.sh new file mode 100755 index 0000000..90a8f8c --- /dev/null +++ b/generate_checksum.sh @@ -0,0 +1,31 @@ +#!/bin/bash +cd "$(realpath $(dirname $0))" + +for coin in monero wownero; +do + COIN=$(echo "$coin" | tr a-z A-Z) + COIN_wallet2_api_c_h_sha256=$(sha256sum ${coin}_libwallet2_api_c/src/main/cpp/wallet2_api_c.h | xargs | awk '{ print $1 }') + COIN_wallet2_api_c_cpp_sha256=$(sha256sum ${coin}_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp | xargs | awk '{ print $1 }') + COIN_wallet2_api_c_exp_sha256=$(sha256sum ${coin}_libwallet2_api_c/${coin}_libwallet2_api_c.exp | xargs | awk '{ print $1 }') + COIN_libwallet2_api_c_version=$(git log --exclude=${coin}_checksum.h --oneline -- ${coin}_libwallet2_api_c | wc -l) + COIN_libwallet2_api_c_date=$(git log --exclude=${coin}_checksum.h -1 --format=%ai -- ${coin}_libwallet2_api_c) + + cat > ${coin}_libwallet2_api_c/src/main/cpp/${coin}_checksum.h << EOF +#ifndef MONEROC_CHECKSUMS +#define MONEROC_CHECKSUMS +const char * ${COIN}_wallet2_api_c_h_sha256 = "${COIN_wallet2_api_c_h_sha256}"; +const char * ${COIN}_wallet2_api_c_cpp_sha256 = "${COIN_wallet2_api_c_cpp_sha256}"; +const char * ${COIN}_wallet2_api_c_exp_sha256 = "${COIN_wallet2_api_c_exp_sha256}"; +const int ${COIN}_libwallet2_api_c_version = ${COIN_libwallet2_api_c_version}; +const char * ${COIN}_wallet2_api_c_date = "${COIN_libwallet2_api_c_date}"; +#endif +EOF + cat > impls/monero.dart/lib/src/checksum_${coin}.dart << EOF +// ignore_for_file: constant_identifier_names +const String wallet2_api_c_h_sha256 = "${COIN_wallet2_api_c_h_sha256}"; +const String wallet2_api_c_cpp_sha256 = "${COIN_wallet2_api_c_cpp_sha256}"; +const String wallet2_api_c_exp_sha256 = "${COIN_wallet2_api_c_exp_sha256}"; +const int libwallet2_api_c_version = ${COIN_libwallet2_api_c_version}; +const String wallet2_api_c_date = "${COIN_libwallet2_api_c_date}"; +EOF +done \ No newline at end of file diff --git a/impls/monero.dart/ffigen_monero.yaml b/impls/monero.dart/ffigen_monero.yaml index 3732939..516dbc9 100644 --- a/impls/monero.dart/ffigen_monero.yaml +++ b/impls/monero.dart/ffigen_monero.yaml @@ -3,7 +3,7 @@ description: monero_c bindings output: 'lib/src/generated_bindings_monero.g.dart' headers: entry-points: - - 'monero_wallet2_api_c.h' + - '../../monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h' exclude-all-by-default: true functions: diff --git a/impls/monero.dart/ffigen_wownero.yaml b/impls/monero.dart/ffigen_wownero.yaml index e057fa1..1149dca 100644 --- a/impls/monero.dart/ffigen_wownero.yaml +++ b/impls/monero.dart/ffigen_wownero.yaml @@ -3,7 +3,7 @@ description: monero_c wownero bindings output: 'lib/src/generated_bindings_wownero.g.dart' headers: entry-points: - - 'wownero_wallet2_api_c.h' + - '../../wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h' exclude-all-by-default: true functions: diff --git a/impls/monero.dart/lib/monero.dart b/impls/monero.dart/lib/monero.dart index 818caf7..2d573ff 100644 --- a/impls/monero.dart/lib/monero.dart +++ b/impls/monero.dart/lib/monero.dart @@ -77,6 +77,8 @@ import 'dart:io'; import 'package:ffi/ffi.dart'; import 'package:monero/src/generated_bindings_monero.g.dart'; +export 'src/checksum_monero.dart'; + typedef PendingTransaction = Pointer; MoneroC? lib; @@ -3916,6 +3918,51 @@ int MONERO_cw_WalletListener_height(WalletListener wlptr) { return s; } +String MONERO_checksum_wallet2_api_c_h() { + debugStart?.call('MONERO_checksum_wallet2_api_c_h'); + lib ??= MoneroC(DynamicLibrary.open(libPath)); + + final s = lib!.MONERO_checksum_wallet2_api_c_h(); + debugEnd?.call('MONERO_checksum_wallet2_api_c_h'); + return s.cast().toDartString(); +} + +String MONERO_checksum_wallet2_api_c_cpp() { + debugStart?.call('MONERO_checksum_wallet2_api_c_cpp'); + lib ??= MoneroC(DynamicLibrary.open(libPath)); + + final s = lib!.MONERO_checksum_wallet2_api_c_cpp(); + debugEnd?.call('MONERO_checksum_wallet2_api_c_cpp'); + return s.cast().toDartString(); +} + +String MONERO_checksum_wallet2_api_c_exp() { + debugStart?.call('MONERO_checksum_wallet2_api_c_exp'); + lib ??= MoneroC(DynamicLibrary.open(libPath)); + + final s = lib!.MONERO_checksum_wallet2_api_c_exp(); + debugEnd?.call('MONERO_checksum_wallet2_api_c_exp'); + return s.cast().toDartString(); +} + +int MONERO_checksum_wallet2_api_c_version() { + debugStart?.call('MONERO_checksum_wallet2_api_c_version'); + lib ??= MoneroC(DynamicLibrary.open(libPath)); + + final s = lib!.MONERO_checksum_wallet2_api_c_version(); + debugEnd?.call('MONERO_checksum_wallet2_api_c_version'); + return s; +} + +String MONERO_checksum_wallet2_api_c_date() { + debugStart?.call('MONERO_checksum_wallet2_api_c_date'); + lib ??= MoneroC(DynamicLibrary.open(libPath)); + + final s = lib!.MONERO_checksum_wallet2_api_c_date(); + debugEnd?.call('MONERO_checksum_wallet2_api_c_date'); + return s.cast().toDartString(); +} + void MONERO_free(Pointer wlptr) { debugStart?.call('MONERO_free'); lib ??= MoneroC(DynamicLibrary.open(libPath)); diff --git a/impls/monero.dart/lib/src/checksum_monero.dart b/impls/monero.dart/lib/src/checksum_monero.dart new file mode 100644 index 0000000..cd59b61 --- /dev/null +++ b/impls/monero.dart/lib/src/checksum_monero.dart @@ -0,0 +1,6 @@ +// ignore_for_file: constant_identifier_names +const String wallet2_api_c_h_sha256 = "b9c712f59873da33dfc4c9caa4850ee5cba4bf7310179dfc33af9d3029d9855a"; +const String wallet2_api_c_cpp_sha256 = "7edf0905802faa48f66362a6d2ebf25f458107b67cd4abc6d01886c40f5634ef"; +const String wallet2_api_c_exp_sha256 = "bfac0ee584f50bd9263ae453103530c2594b21aec8ae7622e8c192c027f5d6af"; +const int libwallet2_api_c_version = 48; +const String wallet2_api_c_date = "2024-07-30 15:06:42 +0000"; diff --git a/impls/monero.dart/lib/src/checksum_wownero.dart b/impls/monero.dart/lib/src/checksum_wownero.dart new file mode 100644 index 0000000..3f629dc --- /dev/null +++ b/impls/monero.dart/lib/src/checksum_wownero.dart @@ -0,0 +1,6 @@ +// ignore_for_file: constant_identifier_names +const String wallet2_api_c_h_sha256 = "1f4688b9ddacbc33e82426c50480ab8e3727718f59e577080a7dc6dca48bcf9d"; +const String wallet2_api_c_cpp_sha256 = "f2b818197f90711d938c17ce0513b110b1e2b4fe9765f54be7afa5a3b4ad8077"; +const String wallet2_api_c_exp_sha256 = "dd9874cc43a6a74bbfa3e49c4ad3f835ff22efd3de8f679cc91c4af3d931aedb"; +const int libwallet2_api_c_version = 25; +const String wallet2_api_c_date = "2024-07-30 15:13:50 +0000"; diff --git a/impls/monero.dart/lib/src/generated_bindings_monero.g.dart b/impls/monero.dart/lib/src/generated_bindings_monero.g.dart index 3733f8d..0337d64 100644 --- a/impls/monero.dart/lib/src/generated_bindings_monero.g.dart +++ b/impls/monero.dart/lib/src/generated_bindings_monero.g.dart @@ -5414,4 +5414,58 @@ class MoneroC { 'MONERO_free'); late final _MONERO_free = _MONERO_freePtr.asFunction)>(); + + ffi.Pointer MONERO_checksum_wallet2_api_c_h() { + return _MONERO_checksum_wallet2_api_c_h(); + } + + late final _MONERO_checksum_wallet2_api_c_hPtr = + _lookup Function()>>( + 'MONERO_checksum_wallet2_api_c_h'); + late final _MONERO_checksum_wallet2_api_c_h = + _MONERO_checksum_wallet2_api_c_hPtr.asFunction< + ffi.Pointer Function()>(); + + ffi.Pointer MONERO_checksum_wallet2_api_c_cpp() { + return _MONERO_checksum_wallet2_api_c_cpp(); + } + + late final _MONERO_checksum_wallet2_api_c_cppPtr = + _lookup Function()>>( + 'MONERO_checksum_wallet2_api_c_cpp'); + late final _MONERO_checksum_wallet2_api_c_cpp = + _MONERO_checksum_wallet2_api_c_cppPtr.asFunction< + ffi.Pointer Function()>(); + + ffi.Pointer MONERO_checksum_wallet2_api_c_exp() { + return _MONERO_checksum_wallet2_api_c_exp(); + } + + late final _MONERO_checksum_wallet2_api_c_expPtr = + _lookup Function()>>( + 'MONERO_checksum_wallet2_api_c_exp'); + late final _MONERO_checksum_wallet2_api_c_exp = + _MONERO_checksum_wallet2_api_c_expPtr.asFunction< + ffi.Pointer Function()>(); + + int MONERO_checksum_wallet2_api_c_version() { + return _MONERO_checksum_wallet2_api_c_version(); + } + + late final _MONERO_checksum_wallet2_api_c_versionPtr = + _lookup>( + 'MONERO_checksum_wallet2_api_c_version'); + late final _MONERO_checksum_wallet2_api_c_version = + _MONERO_checksum_wallet2_api_c_versionPtr.asFunction(); + + ffi.Pointer MONERO_checksum_wallet2_api_c_date() { + return _MONERO_checksum_wallet2_api_c_date(); + } + + late final _MONERO_checksum_wallet2_api_c_datePtr = + _lookup Function()>>( + 'MONERO_checksum_wallet2_api_c_date'); + late final _MONERO_checksum_wallet2_api_c_date = + _MONERO_checksum_wallet2_api_c_datePtr.asFunction< + ffi.Pointer Function()>(); } diff --git a/impls/monero.dart/lib/src/generated_bindings_wownero.g.dart b/impls/monero.dart/lib/src/generated_bindings_wownero.g.dart index 527ab17..24792e4 100644 --- a/impls/monero.dart/lib/src/generated_bindings_wownero.g.dart +++ b/impls/monero.dart/lib/src/generated_bindings_wownero.g.dart @@ -4977,4 +4977,58 @@ class WowneroC { 'WOWNERO_free'); late final _WOWNERO_free = _WOWNERO_freePtr.asFunction)>(); + + ffi.Pointer WOWNERO_checksum_wallet2_api_c_h() { + return _WOWNERO_checksum_wallet2_api_c_h(); + } + + late final _WOWNERO_checksum_wallet2_api_c_hPtr = + _lookup Function()>>( + 'WOWNERO_checksum_wallet2_api_c_h'); + late final _WOWNERO_checksum_wallet2_api_c_h = + _WOWNERO_checksum_wallet2_api_c_hPtr.asFunction< + ffi.Pointer Function()>(); + + ffi.Pointer WOWNERO_checksum_wallet2_api_c_cpp() { + return _WOWNERO_checksum_wallet2_api_c_cpp(); + } + + late final _WOWNERO_checksum_wallet2_api_c_cppPtr = + _lookup Function()>>( + 'WOWNERO_checksum_wallet2_api_c_cpp'); + late final _WOWNERO_checksum_wallet2_api_c_cpp = + _WOWNERO_checksum_wallet2_api_c_cppPtr.asFunction< + ffi.Pointer Function()>(); + + ffi.Pointer WOWNERO_checksum_wallet2_api_c_exp() { + return _WOWNERO_checksum_wallet2_api_c_exp(); + } + + late final _WOWNERO_checksum_wallet2_api_c_expPtr = + _lookup Function()>>( + 'WOWNERO_checksum_wallet2_api_c_exp'); + late final _WOWNERO_checksum_wallet2_api_c_exp = + _WOWNERO_checksum_wallet2_api_c_expPtr.asFunction< + ffi.Pointer Function()>(); + + int WOWNERO_checksum_wallet2_api_c_version() { + return _WOWNERO_checksum_wallet2_api_c_version(); + } + + late final _WOWNERO_checksum_wallet2_api_c_versionPtr = + _lookup>( + 'WOWNERO_checksum_wallet2_api_c_version'); + late final _WOWNERO_checksum_wallet2_api_c_version = + _WOWNERO_checksum_wallet2_api_c_versionPtr.asFunction(); + + ffi.Pointer WOWNERO_checksum_wallet2_api_c_date() { + return _WOWNERO_checksum_wallet2_api_c_date(); + } + + late final _WOWNERO_checksum_wallet2_api_c_datePtr = + _lookup Function()>>( + 'WOWNERO_checksum_wallet2_api_c_date'); + late final _WOWNERO_checksum_wallet2_api_c_date = + _WOWNERO_checksum_wallet2_api_c_datePtr.asFunction< + ffi.Pointer Function()>(); } diff --git a/impls/monero.dart/lib/wownero.dart b/impls/monero.dart/lib/wownero.dart index 2f9252d..401da8d 100644 --- a/impls/monero.dart/lib/wownero.dart +++ b/impls/monero.dart/lib/wownero.dart @@ -77,6 +77,8 @@ import 'dart:io'; import 'package:ffi/ffi.dart'; import 'package:monero/src/generated_bindings_wownero.g.dart'; +export 'src/checksum_wownero.dart'; + typedef PendingTransaction = Pointer; WowneroC? lib; @@ -3604,6 +3606,53 @@ int WOWNERO_deprecated_14WordSeedHeight({ return s; } + +String WOWNERO_checksum_wallet2_api_c_h() { + debugStart?.call('WOWNERO_checksum_wallet2_api_c_h'); + lib ??= WowneroC(DynamicLibrary.open(libPath)); + + final s = lib!.WOWNERO_checksum_wallet2_api_c_h(); + debugEnd?.call('WOWNERO_checksum_wallet2_api_c_h'); + return s.cast().toDartString(); +} + +String WOWNERO_checksum_wallet2_api_c_cpp() { + debugStart?.call('WOWNERO_checksum_wallet2_api_c_cpp'); + lib ??= WowneroC(DynamicLibrary.open(libPath)); + + final s = lib!.WOWNERO_checksum_wallet2_api_c_cpp(); + debugEnd?.call('WOWNERO_checksum_wallet2_api_c_cpp'); + return s.cast().toDartString(); +} + +String WOWNERO_checksum_wallet2_api_c_exp() { + debugStart?.call('WOWNERO_checksum_wallet2_api_c_exp'); + lib ??= WowneroC(DynamicLibrary.open(libPath)); + + final s = lib!.WOWNERO_checksum_wallet2_api_c_exp(); + debugEnd?.call('WOWNERO_checksum_wallet2_api_c_exp'); + return s.cast().toDartString(); +} + +int WOWNERO_checksum_wallet2_api_c_version() { + debugStart?.call('WOWNERO_checksum_wallet2_api_c_version'); + lib ??= WowneroC(DynamicLibrary.open(libPath)); + + final s = lib!.WOWNERO_checksum_wallet2_api_c_version(); + debugEnd?.call('WOWNERO_checksum_wallet2_api_c_version'); + return s; +} + +String WOWNERO_checksum_wallet2_api_c_date() { + debugStart?.call('WOWNERO_checksum_wallet2_api_c_date'); + lib ??= WowneroC(DynamicLibrary.open(libPath)); + + final s = lib!.WOWNERO_checksum_wallet2_api_c_date(); + debugEnd?.call('WOWNERO_checksum_wallet2_api_c_date'); + return s.cast().toDartString(); +} + + void WOWNERO_free(Pointer wlptr) { debugStart?.call('WOWNERO_free'); lib ??= WowneroC(DynamicLibrary.open(libPath)); diff --git a/impls/monero.dart/monero_wallet2_api_c.h b/impls/monero.dart/monero_wallet2_api_c.h deleted file mode 120000 index 21162b9..0000000 --- a/impls/monero.dart/monero_wallet2_api_c.h +++ /dev/null @@ -1 +0,0 @@ -../../monero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h \ No newline at end of file diff --git a/impls/monero.dart/wownero_wallet2_api_c.h b/impls/monero.dart/wownero_wallet2_api_c.h deleted file mode 120000 index 3dfff5c..0000000 --- a/impls/monero.dart/wownero_wallet2_api_c.h +++ /dev/null @@ -1 +0,0 @@ -../../wownero_libwallet2_api_c/src/main/cpp/wallet2_api_c.h \ No newline at end of file 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 #include #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 #include #include +#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 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 #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(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 diff --git a/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp b/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp index 09cb687..5b3a81f 100644 --- a/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp +++ b/wownero_libwallet2_api_c/wownero_libwallet2_api_c.exp @@ -282,3 +282,8 @@ _WOWNERO_deprecated_restore14WordSeed _WOWNERO_deprecated_create14WordSeed _WOWNERO_deprecated_14WordSeedHeight _WOWNERO_free +_WOWNERO_checksum_wallet2_api_c_h +_WOWNERO_checksum_wallet2_api_c_cpp +_WOWNERO_checksum_wallet2_api_c_exp +_WOWNERO_checksum_wallet2_api_c_version +_WOWNERO_checksum_wallet2_api_c_date \ No newline at end of file