Revert "monero: update dependencies (#3064)" (#3114)

This reverts commit e37f478588446764efe2d5c0ecef133ce2295954.

Omar Hatem committed Mar 20, 2026 at 15:56 UTC 2d034091ffc95dc36530d23cb0cce401b19db9bf
27 files changed +88 -116
.github/workflows/pr_test_build_linux.yml
+7 -10
@@ -113,15 +113,12 @@ jobs:
113
114 - name: Build monero_c
115 run: |
116 - ./scripts/prepare_moneroc.sh
117 - mkdir -p scripts/monero_c/release
118 - pushd scripts/monero_c/release
119 - mkdir -p $(git describe --tags)
120 - pushd $(git describe --tags)
121 - wget https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.6-RC1/release-bundle.zip
122 - unzip release-bundle.zip
123 - rm release-bundle.zip
124 - popd
116 + mkdir -p scripts/monero_c
117 + pushd scripts/monero_c
118 + wget https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip
119 + unzip release-bundle.zip
120 + rm release-bundle.zip
121 + unxz -fv release/*/*.xz
122 popd
123
124 - name: Execute Build and Setup Commands
@@ -221,7 +218,7 @@ jobs:
218 exec timeout --signal=SIGKILL 900 flutter drive --driver=test_driver/integration_test.dart --target=integration_test/test_suites/restore_wallet_through_seeds_flow_test.dart
219 - name: Test [cw_monero]
220 timeout-minutes: 15
224 - run: cd cw_monero && flutter test
221 + run: cd cw_monero && flutter test --verbose
222 - name: Stop screen recording, encrypt and upload
223 if: always()
224 run: |
android/app/src/main/jniLibs/.gitignore deleted
-1
@@ -1 +0,0 @@
1 -lib*_wallet2_api_c.so
android/app/src/main/jniLibs/arm64-v8a/libmonero_libwallet2_api_c.so new
+1
@@ -0,0 +1 @@
1 +../../../../../../scripts/monero_c/release/monero/aarch64-linux-android_libwallet2_api_c.so
\ No newline at end of file
android/app/src/main/jniLibs/arm64-v8a/libwownero_libwallet2_api_c.so new
+1
@@ -0,0 +1 @@
1 +../../../../../../scripts/monero_c/release/wownero/aarch64-linux-android_libwallet2_api_c.so
\ No newline at end of file
android/app/src/main/jniLibs/arm64-v8a/libzano_libwallet2_api_c.so new
+1
@@ -0,0 +1 @@
1 +../../../../../../scripts/monero_c/release/zano/aarch64-linux-android_libwallet2_api_c.so
\ No newline at end of file
android/app/src/main/jniLibs/armeabi-v7a/libmonero_libwallet2_api_c.so new
+1
@@ -0,0 +1 @@
1 +../../../../../../scripts/monero_c/release/monero/armv7a-linux-androideabi_libwallet2_api_c.so
\ No newline at end of file
android/app/src/main/jniLibs/armeabi-v7a/libwownero_libwallet2_api_c.so new
+1
@@ -0,0 +1 @@
1 +../../../../../../scripts/monero_c/release/wownero/armv7a-linux-androideabi_libwallet2_api_c.so
\ No newline at end of file
android/app/src/main/jniLibs/armeabi-v7a/libzano_libwallet2_api_c.so new
+1
@@ -0,0 +1 @@
1 +../../../../../../scripts/monero_c/release/zano/armv7a-linux-androideabi_libwallet2_api_c.so
\ No newline at end of file
android/app/src/main/jniLibs/x86_64/libmonero_libwallet2_api_c.so new
+1
@@ -0,0 +1 @@
1 +../../../../../../scripts/monero_c/release/monero/x86_64-linux-android_libwallet2_api_c.so
\ No newline at end of file
android/app/src/main/jniLibs/x86_64/libwownero_libwallet2_api_c.so new
+1
@@ -0,0 +1 @@
1 +../../../../../../scripts/monero_c/release/wownero/x86_64-linux-android_libwallet2_api_c.so
\ No newline at end of file
android/app/src/main/jniLibs/x86_64/libzano_libwallet2_api_c.so new
+1
@@ -0,0 +1 @@
1 +../../../../../../scripts/monero_c/release/zano/x86_64-linux-android_libwallet2_api_c.so
\ No newline at end of file
cw_monero/pubspec.lock
+2 -2
@@ -582,8 +582,8 @@ packages:
582 dependency: "direct main"
583 description:
584 path: "impls/monero.dart"
585 - ref: c157cb82973b05d1226b39b4d8de0bec4aa10000
586 - resolved-ref: c157cb82973b05d1226b39b4d8de0bec4aa10000
585 + ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
586 + resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
587 url: "https://github.com/mrcyjanek/monero_c"
588 source: git
589 version: "0.0.0"
cw_monero/pubspec.yaml
+2 -1
@@ -26,7 +26,7 @@ dependencies:
26 monero:
27 git:
28 url: https://github.com/mrcyjanek/monero_c
29 - ref: c157cb82973b05d1226b39b4d8de0bec4aa10000
29 + ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29
30 path: impls/monero.dart
31 mutex: ^3.1.0
32 ledger_flutter_plus: ^1.4.1
@@ -54,6 +54,7 @@ flutter:
54 # be modified. They are used by the tooling to maintain consistency when
55 # adding or updating assets for this project.
56
57 +
58 # To add assets to your plugin package, add an assets section, like this:
59 # assets:
60 # - images/a_dot_burr.jpeg
cw_monero/test/monero_wallet_service_test.dart
+2 -2
@@ -18,7 +18,7 @@ import 'utils/setup_monero_c.dart';
18 Future<void> main() async {
19 group("MoneroWalletService Tests", () {
20 late MoneroWalletService walletService;
21 - File? moneroCBinary;
21 + late File moneroCBinary;
22
23 setUpAll(() async {
24 await initDb(pathOverride: './test/data/db');
@@ -34,7 +34,7 @@ Future<void> main() async {
34
35 tearDownAll(() {
36 Directory('./test/data').deleteSync(recursive: true);
37 - moneroCBinary!.deleteSync();
37 + moneroCBinary.deleteSync();
38 });
39
40 group("Create wallet", () {
cw_monero/test/utils/setup_monero_c.dart
+9 -20
@@ -1,27 +1,16 @@
1 import 'dart:io';
2 -import 'package:path/path.dart' as p;
2
3 File getMoneroCBinary() {
5 - final baseDir = Directory('../scripts/monero_c/release');
6 -
7 - final versionDir =
8 - baseDir.listSync().whereType<Directory>().map((d) => d.path).firstWhere(
9 - (path) => p.basename(path).startsWith('v'),
10 - );
11 -
12 - if (Platform.isWindows) {
13 - return File(p.join(
14 - versionDir, 'x86_64-w64-mingw32', 'libmonero_wallet2_api_c.dll'));
15 - }
16 - if (Platform.isMacOS) {
17 - return File(p.join(versionDir, 'macos', 'libmonero_wallet2_api_c.dylib'));
18 - }
19 - return File(
20 - p.join(versionDir, 'x86_64-linux-gnu', 'libmonero_wallet2_api_c.so'));
4 + if (Platform.isWindows)
5 + return File(
6 + '../scripts/monero_c/release/monero/x86_64-w64-mingw32_libwallet2_api_c.dll');
7 + if (Platform.isMacOS) return File('../macos/monero_libwallet2_api_c.dylib');
8 + return File('../scripts/monero_c/release/monero/x86_64-linux-gnu_libwallet2_api_c.so');
9 }
10
11 String get moneroCBinaryName {
24 - if (Platform.isWindows) return "libmonero_wallet2_api_c.dll";
25 - if (Platform.isMacOS) return "libmonero_wallet2_api_c.dylib";
26 - return "/usr/lib/libmonero_wallet2_api_c.so";
12 + if (Platform.isWindows)
13 + return "monero_libwallet2_api_c.dll";
14 + if (Platform.isMacOS) return "monero_libwallet2_api_c.dylib";
15 + return "/usr/lib/monero_libwallet2_api_c.so";
16 }
cw_wownero/pubspec.lock
+2 -2
@@ -502,8 +502,8 @@ packages:
502 dependency: "direct main"
503 description:
504 path: "impls/monero.dart"
505 - ref: "c157cb82973b05d1226b39b4d8de0bec4aa10000"
506 - resolved-ref: "c157cb82973b05d1226b39b4d8de0bec4aa10000"
505 + ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
506 + resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
507 url: "https://github.com/mrcyjanek/monero_c"
508 source: git
509 version: "0.0.0"
cw_wownero/pubspec.yaml
+2 -1
@@ -24,7 +24,7 @@ dependencies:
24 monero:
25 git:
26 url: https://github.com/mrcyjanek/monero_c
27 - ref: c157cb82973b05d1226b39b4d8de0bec4aa10000 # monero_c hash
27 + ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 # monero_c hash
28 path: impls/monero.dart
29 mutex: ^3.1.0
30
@@ -49,6 +49,7 @@ flutter:
49 # be modified. They are used by the tooling to maintain consistency when
50 # adding or updating assets for this project.
51
52 +
53 # To add assets to your plugin package, add an assets section, like this:
54 # assets:
55 # - images/a_dot_burr.jpeg
cw_zano/pubspec.lock
+2 -2
@@ -507,8 +507,8 @@ packages:
507 dependency: "direct main"
508 description:
509 path: "impls/monero.dart"
510 - ref: "c157cb82973b05d1226b39b4d8de0bec4aa10000"
511 - resolved-ref: "c157cb82973b05d1226b39b4d8de0bec4aa10000"
510 + ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
511 + resolved-ref: "411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29"
512 url: "https://github.com/mrcyjanek/monero_c"
513 source: git
514 version: "0.0.0"
cw_zano/pubspec.yaml
+2 -1
@@ -25,7 +25,7 @@ dependencies:
25 monero:
26 git:
27 url: https://github.com/mrcyjanek/monero_c
28 - ref: c157cb82973b05d1226b39b4d8de0bec4aa10000 # monero_c hash
28 + ref: 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29 # monero_c hash
29 path: impls/monero.dart
30 dev_dependencies:
31 flutter_test:
@@ -38,6 +38,7 @@ dev_dependencies:
38 dependency_overrides:
39 watcher: ^1.1.0
40
41 +
42 # For information on the generic Dart part of this file, see the
43 # following page: https://dart.dev/tools/pub/pubspec
44
linux/CMakeLists.txt
+6 -29
@@ -113,37 +113,14 @@ else()
113 set(LIB_TRIPLET "x86_64-linux-gnu")
114 endif()
115
116 -execute_process(
117 - COMMAND git describe --tags
118 - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c
119 - OUTPUT_VARIABLE MONERO_C_TAG
120 - OUTPUT_STRIP_TRAILING_WHITESPACE
121 -)
122 -
123 -set(MONERO_C_RELEASE_DIR
124 - "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/${MONERO_C_TAG}/${LIB_TRIPLET}"
125 -)
126 -
127 -install(
128 - FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/zcash_lib/target/release/libwarp_api_ffi.so"
129 - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
130 - RENAME "libwarp_api_ffi.so"
131 - COMPONENT Runtime
132 -)
116 +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/zcash_lib/target/release/libwarp_api_ffi.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "libwarp_api_ffi.so"
117 + COMPONENT Runtime)
118
134 -install(
135 - FILES "${MONERO_C_RELEASE_DIR}/libmonero_wallet2_api_c.so"
136 - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
137 - RENAME "libmonero_wallet2_api_c.so"
138 - COMPONENT Runtime
139 -)
119 +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/monero/${LIB_TRIPLET}_libwallet2_api_c.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "monero_libwallet2_api_c.so"
120 + COMPONENT Runtime)
121
141 -install(
142 - FILES "${MONERO_C_RELEASE_DIR}/libwownero_wallet2_api_c.so"
143 - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
144 - RENAME "libwownero_wallet2_api_c.so"
145 - COMPONENT Runtime
146 -)
122 +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/monero_c/release/wownero/${LIB_TRIPLET}_libwallet2_api_c.so" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" RENAME "wownero_libwallet2_api_c.so"
123 + COMPONENT Runtime)
124
125 install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
126 COMPONENT Runtime)
scripts/android/build_monero_all.sh
+3 -21
@@ -1,7 +1,7 @@
1 #!/bin/bash
2 source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh"
3
4 -# Usage: env USE_DOCKER= ./build_all.sh
4 +# Usage: env USE_DOCKER= ./build_all.sh
5
6 set -x -e
7
@@ -12,33 +12,15 @@ cd "$(dirname "$0")"
12 for COIN in monero wownero zano;
13 do
14 pushd ../monero_c
15 - monero_c_tag=$(git describe --tags)
15 for target in {x86_64,aarch64}-linux-android armv7a-linux-androideabi
16 do
18 - if [[ -f "release/${monero_c_tag}/${target}/${COIN}_libwallet2_api_c.so" ]];
17 + if [[ -f "release/${COIN}/${target}_libwallet2_api_c.so" ]];
18 then
19 echo "file exist, not building monero_c for ${COIN}/$target.";
20 else
21 ./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
22 + unxz -f ../monero_c/release/${COIN}/${target}_libwallet2_api_c.so.xz
23 fi
24 -
25 - case $target in
26 - x86_64-linux-android)
27 - mkdir -p ../../android/app/src/main/jniLibs/x86_64 || true
28 - cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/x86_64/
29 - ;;
30 - armv7a-linux-androideabi)
31 - mkdir -p ../../android/app/src/main/jniLibs/armeabi-v7a || true
32 - cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/armeabi-v7a/
33 - ;;
34 - aarch64-linux-android)
35 - mkdir -p ../../android/app/src/main/jniLibs/arm64-v8a || true
36 - cp ../monero_c/release/${monero_c_tag}/${target}/lib${COIN}_wallet2_api_c.so ../../android/app/src/main/jniLibs/arm64-v8a/
37 - ;;
38 - *)
39 - echo "Unsupported target: $target"
40 - exit 1;
41 - esac
24 done
25 popd
26 done
scripts/ios/build_monero_all.sh
+11 -3
@@ -1,5 +1,5 @@
1 #!/bin/sh
2 -source "$(cd "$(dirname "$0")/.." && pwd)/functions.sh"
2 +source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh"
3
4 . ./config.sh
5 # ./install_missing_headers.sh
@@ -19,8 +19,16 @@ for COIN in monero wownero zano;
19 do
20 pushd ../monero_c
21 ./build_single.sh ${COIN} aarch64-apple-ios -j$MAKE_JOB_COUNT
22 - ./build_single.sh ${COIN} aarch64-apple-ios-simulator -j$MAKE_JOB_COUNT
22 + ./build_single.sh ${COIN} aarch64-apple-iossimulator -j$MAKE_JOB_COUNT
23 popd
24 done
25
26 -./gen_framework.sh
26 +unxz -fk ../monero_c/release/monero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
27 +unxz -fk ../monero_c/release/wownero/aarch64-apple-ios_libwallet2_api_c.dylib.xz
28 +unxz -fk ../monero_c/release/zano/aarch64-apple-ios_libwallet2_api_c.dylib.xz
29 +
30 +unxz -fk ../monero_c/release/monero/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
31 +unxz -fk ../monero_c/release/wownero/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
32 +unxz -fk ../monero_c/release/zano/aarch64-apple-iossimulator_libwallet2_api_c.dylib.xz
33 +
34 +./gen_framework.sh
\ No newline at end of file
scripts/ios/gen_framework.sh
+5 -6
@@ -2,8 +2,7 @@
2 set -e
3
4 IOS_DIR="$(pwd)/../../ios"
5 -monero_c_tag=$(cd $(pwd)/../../scripts/monero_c/; git describe --tags)
6 -DYLIB_PATH="$(pwd)/../../scripts/monero_c/release/${monero_c_tag}/"
5 +DYLIB_PATH="$(pwd)/../../scripts/monero_c/release"
6 TMP_DIR="${IOS_DIR}/tmp"
7
8 rm -rf "${IOS_DIR:?}/MoneroWallet.xcframework" "${IOS_DIR:?}/WowneroWallet.xcframework" "${IOS_DIR:?}/ZanoWallet.xcframework"
@@ -17,7 +16,7 @@ write_info_plist() {
16 target="$3"
17 plist_path="${framework_bundle}/Info.plist"
18
20 - if [[ "x$target" = "xios-simulator" ]]; then
19 + if [[ "x$target" = "xiossimulator" ]]; then
20 platform="iPhoneSimulator"
21 dtplatformname="iphonesimulator"
22 dtsdkname="iphonesimulator17.4"
@@ -98,11 +97,11 @@ create_framework() {
97 echo "Creating ${framework_name}.framework for target ${target} in ${out_dir}..."
98
99 framework_bundle="${out_dir}/${framework_name}.framework"
101 -
100 +
101 rm -rf "$framework_bundle"
102 mkdir -p "$framework_bundle"
103
105 - input_dylib="${DYLIB_PATH}/aarch64-apple-${target}/lib${wallet}_wallet2_api_c.dylib"
104 + input_dylib="${DYLIB_PATH}/${wallet}/aarch64-apple-${target}_libwallet2_api_c.dylib"
105 if [[ ! -f "$input_dylib" ]]; then
106 echo "Error: Input dylib not found: $input_dylib"
107 exit 1
@@ -145,7 +144,7 @@ for i in "${!wallets[@]}"; do
144 mkdir -p "$device_out" "$simulator_out"
145
146 create_framework "$wallet" "$framework_name" "ios" "$device_out"
148 - create_framework "$wallet" "$framework_name" "ios-simulator" "$simulator_out"
147 + create_framework "$wallet" "$framework_name" "iossimulator" "$simulator_out"
148
149 device_framework="${device_out}/${framework_name}.framework"
150 simulator_framework="${simulator_out}/${framework_name}.framework"
scripts/linux/build_monero_all.sh
+9 -3
@@ -16,7 +16,13 @@ do
16 else
17 target="x86_64-linux-gnu"
18 fi
19 -
20 - ./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
19 +
20 + if [[ -f "release/${COIN}/${target}_libwallet2_api_c.so" ]];
21 + then
22 + echo "file exist, not building monero_c for ${COIN}/$target.";
23 + else
24 + ./build_single.sh ${COIN} $target -j$MAKE_JOB_COUNT
25 + unxz -f ../monero_c/release/${COIN}/${target}_libwallet2_api_c.so.xz
26 + fi
27 popd
22 -done
28 +done
\ No newline at end of file
scripts/macos/build_monero_all.sh
+4 -4
@@ -6,8 +6,8 @@ cd "$(dirname "$0")"
6 NPROC="-j$(sysctl -n hw.logicalcpu)"
7 MONERO_LIBS=""
8 WOWNERO_LIBS=""
9 -monero_c_tag=$(cd ../monero_c/; git describe --tags)
10 -MONEROC_RELEASE_DIR="../monero_c/release/${monero_c_tag}"
9 +MONEROC_RELEASE_DIR="../monero_c/release/monero"
10 +WOWNEROC_RELEASE_DIR="../monero_c/release/wownero"
11
12 ../prepare_moneroc.sh
13
@@ -35,8 +35,8 @@ else
35 HOST="x86_64-apple-darwin"
36 fi
37
38 - MONERO_LIBS="$MONERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}/libmonero_libwallet2_api_c.dylib"
39 - WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}/libwownero_libwallet2_api_c.dylib"
38 + MONERO_LIBS="$MONERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
39 + WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${WOWNEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
40
41 pushd ../monero_c
42 ./build_single.sh ${COIN} ${HOST} -j$MAKE_JOB_COUNT
scripts/prepare_moneroc.sh
+8 -7
@@ -9,17 +9,18 @@ then
9 rm -rf monero_c
10 git clone https://github.com/mrcyjanek/monero_c --branch master monero_c
11 cd monero_c
12 + # NOTE: Make sure to update monero_c prebuilds link in workflow files
13 + # https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip
14 + git checkout 411e8a1cdb3f4c2812d83f28c335d2a4eb18bd29
15 + git reset --hard
16 + git submodule update --init --force --recursive
17 + ./apply_patches.sh monero
18 + ./apply_patches.sh wownero
19 + ./apply_patches.sh zano
20 else
21 cd monero_c
22 fi
23
16 -# NOTE: Make sure to update monero_c prebuilds link in workflow files
17 -# https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.6-RC1/release-bundle.zip
18 -git fetch -a
19 -git checkout c157cb82973b05d1226b39b4d8de0bec4aa10000
20 -git reset --hard
21 -git submodule update --init --force --recursive
22 -
24 for coin in monero wownero zano;
25 do
26 if [[ ! -f "$coin/.patch-applied" ]];
tool/download_moneroc_prebuilds.dart
+3 -1
@@ -20,11 +20,13 @@ final List<String> triplets = [
20 "x86_64-w64-mingw32",
21 // "x86_64-apple-darwin11", // Intel macbooks (contrib) - not used by cake
22 // "aarch64-apple-darwin11", // apple silicon macbooks (contrib) - not used by cake
23 + // "host-apple-darwin", // not available on CI (yet)
24 // "x86_64-host-apple-darwin", // not available on CI (yet)
25 "aarch64-apple-darwin", // apple silicon macbooks
26 "x86_64-apple-darwin", // intel macbooks
27 + "aarch64-host-apple-darwin", // apple silicon macbooks (local builds)
28 "aarch64-apple-ios",
27 - "aarch64-apple-ios-simulator",
29 + "aarch64-apple-iossimulator",
30 ];
31
32 Future<void> main() async {