Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Monerodart integration to staging #831

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e128c05
Merge pull request #721 from cypherstack/staging
rehrar Jan 18, 2024
afe43f2
Merge pull request #739 from cypherstack/staging
rehrar Jan 31, 2024
953a9e3
Merge pull request #773 from cypherstack/staging
rehrar Feb 24, 2024
781958f
Merge pull request #784 from cypherstack/staging
rehrar Feb 28, 2024
368c405
Merge pull request #803 from cypherstack/staging
rehrar Mar 10, 2024
a3d7776
initial monero.dart support
MrCyjaneK Mar 20, 2024
e337735
sending transactions
MrCyjaneK Mar 20, 2024
f4d5ad4
android support
MrCyjaneK Mar 21, 2024
515f12d
fix: crash in monero_c
MrCyjaneK Mar 22, 2024
0ae550f
legacy seed support
MrCyjaneK Mar 22, 2024
08f7992
make scripts use less CPU
MrCyjaneK Mar 30, 2024
8e37acc
wownero android libs
MrCyjaneK Mar 30, 2024
a04acc5
DO-NOT-MERGE: initial wow support
MrCyjaneK Mar 30, 2024
4e4a72b
build on macos
MrCyjaneK Apr 1, 2024
27f7465
feat: macos support, that works. To some extend.
MrCyjaneK Apr 1, 2024
da00357
minor adjustments to monerodart_wallet.dart
MrCyjaneK Apr 1, 2024
9961432
fix wownero support
MrCyjaneK Apr 2, 2024
115b384
Merge remote-tracking branch 'origin/staging' into monerodart
sneurlax Apr 3, 2024
6189f2f
added monero_c to build_all.sh for macos and ios
MrCyjaneK Apr 3, 2024
3d0918f
drop dependency on cake's library
MrCyjaneK Apr 4, 2024
b5b78ea
fix hive errors, and wallet migration
MrCyjaneK Apr 4, 2024
c19663c
drop cw_\* entirely
MrCyjaneK Apr 4, 2024
fee100b
PROTOTYPE: async transaction sending
MrCyjaneK Apr 4, 2024
62b0ca0
Merge branch 'monerodart' into monerodart
MrCyjaneK Apr 4, 2024
15f4659
update build scripts
MrCyjaneK Apr 8, 2024
28d521d
use cypherstack source
sneurlax Apr 9, 2024
f473266
initial monero.dart support
MrCyjaneK Mar 20, 2024
63783a3
sending transactions
MrCyjaneK Mar 20, 2024
8953f43
android support
MrCyjaneK Mar 21, 2024
0366d3a
fix: crash in monero_c
MrCyjaneK Mar 22, 2024
ceee257
legacy seed support
MrCyjaneK Mar 22, 2024
5e99b2f
make scripts use less CPU
MrCyjaneK Mar 30, 2024
d856cd7
wownero android libs
MrCyjaneK Mar 30, 2024
ec8b9ca
DO-NOT-MERGE: initial wow support
MrCyjaneK Mar 30, 2024
4eeef7e
build on macos
MrCyjaneK Apr 1, 2024
6cb4881
feat: macos support, that works. To some extend.
MrCyjaneK Apr 1, 2024
b3a0a05
minor adjustments to monerodart_wallet.dart
MrCyjaneK Apr 1, 2024
1539af1
fix wownero support
MrCyjaneK Apr 2, 2024
6876c9a
added monero_c to build_all.sh for macos and ios
MrCyjaneK Apr 3, 2024
f0bbee9
drop dependency on cake's library
MrCyjaneK Apr 4, 2024
e6a7e0c
fix hive errors, and wallet migration
MrCyjaneK Apr 4, 2024
a3a6798
drop cw_\* entirely
MrCyjaneK Apr 4, 2024
7f53830
PROTOTYPE: async transaction sending
MrCyjaneK Apr 4, 2024
f8f4cef
update build scripts
MrCyjaneK Apr 8, 2024
2d2e172
Merge branch 'monerodart_integration' of github.com:cypherstack/stack…
sneurlax Apr 10, 2024
39874ad
remove dup submodule
sneurlax Apr 10, 2024
b0e5de4
add libwallet2 linux deps
sneurlax Apr 10, 2024
bf29832
libwallet2 scripts
sneurlax Apr 10, 2024
ec65a7f
use sudo in windows build script
sneurlax Apr 11, 2024
848ee56
install homebrew deps in macos script (boost, libsodium, zmq)
sneurlax Apr 11, 2024
2e198ed
update windows build script
sneurlax Apr 11, 2024
4c5e4a0
remove merge artefacts
sneurlax Apr 12, 2024
02fb28e
Merge remote-tracking branch 'origin/monerodart_integration' into mon…
sneurlax Apr 12, 2024
259c9ed
Add Android dependency
sneurlax Apr 11, 2024
120d451
use updated monero_c scripts for Windows
sneurlax Apr 12, 2024
77ec293
update iOS monero_c build to not fail on `mv: Directory not empty`
sneurlax Apr 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[submodule "crypto_plugins/flutter_libepiccash"]
path = crypto_plugins/flutter_libepiccash
url = https://github.com/cypherstack/flutter_libepiccash.git
[submodule "crypto_plugins/flutter_libmonero"]
path = crypto_plugins/flutter_libmonero
url = https://github.com/cypherstack/flutter_libmonero.git
[submodule "crypto_plugins/flutter_liblelantus"]
path = crypto_plugins/flutter_liblelantus
url = https://github.com/cypherstack/flutter_liblelantus.git
[submodule "crypto_plugins/frostdart"]
path = crypto_plugins/frostdart
url = https://github.com/cypherstack/frostdart
[submodule "crypto_plugins/monero_c"]
path = crypto_plugins/monero_c
url = https://github.com/cypherstack/monero_c
branch = rewrite-wip # TODO [prio=med]: Pin to audited hash if using github.com/mrcyjanek.
7 changes: 6 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ if (keystorePropertiesFile.exists()) {

android {
compileSdkVersion 33

packagingOptions {
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
}
// ndkVersion = "21.1.6352462"
// ndkVersion = "25.2.9519653"
ndkVersion = "23.1.7779620"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Generated file.
//
// If you wish to remove Flutter's multidex support, delete this entire file.
//
// Modifications to this file should be done in a copy under a different name
// as this file may be regenerated.

package io.flutter.app;

import android.app.Application;
import android.content.Context;
import androidx.annotation.CallSuper;
import androidx.multidex.MultiDex;

/**
* Extension of {@link android.app.Application}, adding multidex support.
*/
public class FlutterMultiDexApplication extends Application {
@Override
@CallSuper
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
1 change: 0 additions & 1 deletion crypto_plugins/flutter_libmonero
Submodule flutter_libmonero deleted from cb8762
1 change: 1 addition & 0 deletions crypto_plugins/monero_c
Submodule monero_c added at 9c3871
2 changes: 1 addition & 1 deletion docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Make a Pixel 4 (API 30) x86_64 emulator with 2GB of storage space for emulation

Install basic dependencies
```
sudo apt-get install libssl-dev curl unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev llvm python3-distutils
sudo apt-get install libssl-dev curl unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev llvm python3-distutils gcc g++ gperf
sneurlax marked this conversation as resolved.
Show resolved Hide resolved
```

The following *may* be needed for Android studio:
Expand Down
34 changes: 23 additions & 11 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ PODS:
- Flutter
- MTBBarcodeScanner
- SwiftProtobuf
- coinlib_flutter (0.3.2):
- Flutter
- FlutterMacOS
- connectivity_plus (0.0.1):
- Flutter
- ReachabilitySwift
Expand Down Expand Up @@ -106,6 +109,8 @@ PODS:
- Flutter
- flutter_libmonero (0.0.1):
- Flutter
- flutter_libsparkmobile (0.0.1):
- Flutter
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_native_splash (0.0.1):
Expand All @@ -126,28 +131,28 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.0.4):
- permission_handler_apple (9.1.1):
- Flutter
- ReachabilitySwift (5.0.0)
- SDWebImage (5.13.2):
- SDWebImage/Core (= 5.13.2)
- SDWebImage/Core (5.13.2)
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- stack_wallet_backup (0.0.1):
- Flutter
- SwiftProtobuf (1.19.0)
- SwiftyGif (5.4.3)
- tor_ffi_plugin (0.0.1):
- Flutter
- url_launcher_ios (0.0.1):
- Flutter
- wakelock (0.0.1):
- Flutter

DEPENDENCIES:
- barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`)
- coinlib_flutter (from `.symlinks/plugins/coinlib_flutter/darwin`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- cw_monero (from `.symlinks/plugins/cw_monero/ios`)
- cw_shared_external (from `.symlinks/plugins/cw_shared_external/ios`)
Expand All @@ -158,6 +163,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_libepiccash (from `.symlinks/plugins/flutter_libepiccash/ios`)
- flutter_libmonero (from `.symlinks/plugins/flutter_libmonero/ios`)
- flutter_libsparkmobile (from `.symlinks/plugins/flutter_libsparkmobile/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
Expand All @@ -169,8 +175,8 @@ DEPENDENCIES:
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- stack_wallet_backup (from `.symlinks/plugins/stack_wallet_backup/ios`)
- tor_ffi_plugin (from `.symlinks/plugins/tor_ffi_plugin/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`)

Expand All @@ -187,6 +193,8 @@ SPEC REPOS:
EXTERNAL SOURCES:
barcode_scan2:
:path: ".symlinks/plugins/barcode_scan2/ios"
coinlib_flutter:
:path: ".symlinks/plugins/coinlib_flutter/darwin"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
cw_monero:
Expand All @@ -207,6 +215,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_libepiccash/ios"
flutter_libmonero:
:path: ".symlinks/plugins/flutter_libmonero/ios"
flutter_libsparkmobile:
:path: ".symlinks/plugins/flutter_libsparkmobile/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_native_splash:
Expand All @@ -229,17 +239,18 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/permission_handler_apple/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
stack_wallet_backup:
:path: ".symlinks/plugins/stack_wallet_backup/ios"
tor_ffi_plugin:
:path: ".symlinks/plugins/tor_ffi_plugin/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
wakelock:
:path: ".symlinks/plugins/wakelock/ios"

SPEC CHECKSUMS:
barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0
coinlib_flutter: 6abec900d67762a6e7ccfd567a3cd3ae00bbee35
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
cw_monero: 9816991daff0e3ad0a8be140e31933b5526babd4
cw_shared_external: 2972d872b8917603478117c9957dfca611845a92
Expand All @@ -252,6 +263,7 @@ SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_libepiccash: 36241aa7d3126f6521529985ccb3dc5eaf7bb317
flutter_libmonero: da68a616b73dd0374a8419c684fa6b6df2c44ffe
flutter_libsparkmobile: 6373955cc3327a926d17059e7405dde2fb12f99f
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
Expand All @@ -261,18 +273,18 @@ SPEC CHECKSUMS:
local_auth: 1740f55d7af0a2e2a8684ce225fe79d8931e808c
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866
share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028
shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c
stack_wallet_backup: 5b8563aba5d8ffbf2ce1944331ff7294a0ec7c03
SwiftProtobuf: 6ef3f0e422ef90d6605ca20b21a94f6c1324d6b3
SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780
tor_ffi_plugin: d80e291b649379c8176e1be739e49be007d4ef93
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f

PODFILE CHECKSUM: 57c8aed26fba39d3ec9424816221f294a07c58eb

COCOAPODS: 1.11.3
COCOAPODS: 1.15.2
6 changes: 5 additions & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -305,6 +305,7 @@
"${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework",
"${BUILT_PRODUCTS_DIR}/SwiftyGif/SwiftyGif.framework",
"${BUILT_PRODUCTS_DIR}/barcode_scan2/barcode_scan2.framework",
"${BUILT_PRODUCTS_DIR}/coinlib_flutter/secp256k1.framework",
"${BUILT_PRODUCTS_DIR}/connectivity_plus/connectivity_plus.framework",
"${BUILT_PRODUCTS_DIR}/cw_monero/cw_monero.framework",
"${BUILT_PRODUCTS_DIR}/cw_shared_external/cw_shared_external.framework",
Expand All @@ -313,6 +314,7 @@
"${BUILT_PRODUCTS_DIR}/devicelocale/devicelocale.framework",
"${BUILT_PRODUCTS_DIR}/file_picker/file_picker.framework",
"${BUILT_PRODUCTS_DIR}/flutter_libmonero/flutter_libmonero.framework",
"${PODS_ROOT}/../.symlinks/plugins/flutter_libsparkmobile/ios/flutter_libsparkmobile.framework",
"${BUILT_PRODUCTS_DIR}/flutter_local_notifications/flutter_local_notifications.framework",
"${BUILT_PRODUCTS_DIR}/flutter_native_splash/flutter_native_splash.framework",
"${BUILT_PRODUCTS_DIR}/flutter_secure_storage/flutter_secure_storage.framework",
Expand All @@ -338,6 +340,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyGif.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/barcode_scan2.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/secp256k1.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cw_monero.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cw_shared_external.framework",
Expand All @@ -346,6 +349,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/devicelocale.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/file_picker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_libmonero.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_libsparkmobile.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_local_notifications.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_native_splash.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_secure_storage.framework",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
14 changes: 14 additions & 0 deletions lib/cw_legacy/enumerable_item.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
abstract class EnumerableItem<T> {
const EnumerableItem({required this.title, required this.raw});

final T raw;
final String? title;

@override
String toString() => title!;
}

mixin Serializable<T> on EnumerableItem<T> {
static Serializable? deserialize<T>({T? raw}) => null;
T serialize() => raw;
}
3 changes: 3 additions & 0 deletions lib/cw_legacy/keyable.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mixin Keyable {
dynamic keyIndex;
}
74 changes: 74 additions & 0 deletions lib/cw_legacy/monero_transasction_priority.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
//import 'package:flutter_libmonero/generated/i18n.dart';
import 'package:stackwallet/cw_legacy/enumerable_item.dart';
import 'package:stackwallet/cw_legacy/wallet_type.dart';
abstract class TransactionPriority extends EnumerableItem<int?>
with Serializable<int?> {
const TransactionPriority({super.title, super.raw});
}
class MoneroTransactionPriority extends TransactionPriority {
const MoneroTransactionPriority({super.title, super.raw});

static const all = [
MoneroTransactionPriority.slow,
MoneroTransactionPriority.regular,
MoneroTransactionPriority.medium,
MoneroTransactionPriority.fast,
MoneroTransactionPriority.fastest
];
static const slow = MoneroTransactionPriority(title: 'Slow', raw: 0);
static const regular = MoneroTransactionPriority(title: 'Regular', raw: 1);
static const medium = MoneroTransactionPriority(title: 'Medium', raw: 2);
static const fast = MoneroTransactionPriority(title: 'Fast', raw: 3);
static const fastest = MoneroTransactionPriority(title: 'Fastest', raw: 4);
static const standard = slow;

static List<MoneroTransactionPriority> forWalletType(WalletType type) {
switch (type) {
case WalletType.monero:
return MoneroTransactionPriority.all;
case WalletType.bitcoin:
return [
MoneroTransactionPriority.slow,
MoneroTransactionPriority.regular,
MoneroTransactionPriority.fast
];
default:
return [];
}
}

static MoneroTransactionPriority? deserialize({int? raw}) {
switch (raw) {
case 0:
return slow;
case 1:
return regular;
case 2:
return medium;
case 3:
return fast;
case 4:
return fastest;
default:
return null;
}
}

@override
String toString() {
switch (this) {
case MoneroTransactionPriority.slow:
return 'Slow'; // S.current.transaction_priority_slow;
case MoneroTransactionPriority.regular:
return 'Regular'; // S.current.transaction_priority_regular;
case MoneroTransactionPriority.medium:
return 'Medium'; // S.current.transaction_priority_medium;
case MoneroTransactionPriority.fast:
return 'Fast'; // S.current.transaction_priority_fast;
case MoneroTransactionPriority.fastest:
return 'Fastest'; // S.current.transaction_priority_fastest;
default:
return '';
}
}
}
Loading