From 913754ca73c88c15efe60cfdb8bca93ec48ac7c6 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 25 Jan 2023 14:21:45 -0600 Subject: [PATCH 001/114] update README --- README.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7cf7e03..f1bc85f 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,31 @@ +# flutter_libepiccash -install rust -https://www.rust-lang.org/tools/install +An Epic Cash plugin in Dart for Flutter -install cargo ndk -cargo install cargo-ndk -for android: +## Build +Install Rust: https://www.rust-lang.org/tools/install -add targets to rust +Install cargo ndk: `cargo install cargo-ndk` + +### Build for Android +``` rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android sudo apt-get install libc6-dev-i386 -https://github.com/EpicCash/epic/blob/master/doc/build.md#requirements +# https://github.com/EpicCash/epic/blob/master/doc/build.md#requirements sudo apt install build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config llvm sudo apt-get install build-essential debhelper cmake libclang-dev libncurses5-dev clang libncursesw5-dev cargo rustc opencl-headers libssl-dev pkg-config ocl-icd-opencl-dev cd scripts/android ./install_ndk.sh ./build_all.sh +``` +### Build for iOS: -for ios: - -add targets to rust +``` rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim cargo install cargo-lipo @@ -31,3 +33,7 @@ cargo install cbindgen cd scripts/ios ./build_all +``` + +## Usage +See [Stack Wallet](https://github.com/cypherstack/stack_wallet) and [Epic Pay](https://github.com/cypherstack/epic-mobile) From 31d9186e6b9f6363dfcb5c7c6857c7a4c03f312d Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 25 Jan 2023 14:33:30 -0600 Subject: [PATCH 002/114] add testing note --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f1bc85f..c931856 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Install Rust: https://www.rust-lang.org/tools/install Install cargo ndk: `cargo install cargo-ndk` -### Build for Android +### Android ``` rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android @@ -23,7 +23,7 @@ cd scripts/android ./build_all.sh ``` -### Build for iOS: +### iOS: ``` rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim @@ -35,5 +35,8 @@ cd scripts/ios ./build_all ``` +## Test +Run `flutter test` + ## Usage See [Stack Wallet](https://github.com/cypherstack/stack_wallet) and [Epic Pay](https://github.com/cypherstack/epic-mobile) From 074e23819be3131f86d232213321bdc4839657c0 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Fri, 3 Feb 2023 12:32:01 -0600 Subject: [PATCH 003/114] linting --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7bb4989..3e85f8c 100644 --- a/.gitignore +++ b/.gitignore @@ -28,12 +28,12 @@ migrate_working_dir/ .dart_tool/ .packages build/ +rust/libepic_cash_wallet.h +rust/default/ rust/src/bin android/src/main/jniLibs/ -rust/default/ ios/include/ ios/libs/ -rust/libepic_cash_wallet.h lib/git_versions.dart scripts/windows/vcpkg/ From 7d1b9c7f90cf240b4779e98f4c171b11f7e8ca72 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Fri, 3 Feb 2023 12:34:17 -0600 Subject: [PATCH 004/114] com.example -> com.cypherstack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💼 --- android/build.gradle | 2 +- android/src/main/AndroidManifest.xml | 2 +- .../flutter_libepiccash/FlutterLibepiccashPlugin.kt | 2 +- example/android/app/build.gradle | 2 +- example/android/app/src/debug/AndroidManifest.xml | 2 +- example/android/app/src/main/AndroidManifest.xml | 2 +- .../com/example/flutter_libepiccash_example/MainActivity.kt | 2 +- example/android/app/src/profile/AndroidManifest.xml | 2 +- example/ios/Runner.xcodeproj/project.pbxproj | 6 +++--- example/lib/main.dart | 2 +- example/lib/mnemonic_view.dart | 2 +- example/lib/recover_view.dart | 2 +- example/linux/CMakeLists.txt | 2 +- example/macos/Runner/Configs/AppInfo.xcconfig | 2 +- example/windows/runner/Runner.rc | 2 +- ios/flutter_libepiccash.podspec | 2 +- macos/flutter_libepiccash.podspec | 2 +- pubspec.yaml | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) rename android/src/main/kotlin/com/{example => cypherstack}/flutter_libepiccash/FlutterLibepiccashPlugin.kt (96%) diff --git a/android/build.gradle b/android/build.gradle index 4b834a5..aba9274 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,4 +1,4 @@ -group 'com.example.flutter_libepiccash' +group 'com.cypherstack.flutter_libepiccash' version '1.0-SNAPSHOT' buildscript { diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index b0411d6..fbf8cf8 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.cypherstack.flutter_libepiccash"> diff --git a/android/src/main/kotlin/com/example/flutter_libepiccash/FlutterLibepiccashPlugin.kt b/android/src/main/kotlin/com/cypherstack/flutter_libepiccash/FlutterLibepiccashPlugin.kt similarity index 96% rename from android/src/main/kotlin/com/example/flutter_libepiccash/FlutterLibepiccashPlugin.kt rename to android/src/main/kotlin/com/cypherstack/flutter_libepiccash/FlutterLibepiccashPlugin.kt index 0abb4a0..718737d 100644 --- a/android/src/main/kotlin/com/example/flutter_libepiccash/FlutterLibepiccashPlugin.kt +++ b/android/src/main/kotlin/com/cypherstack/flutter_libepiccash/FlutterLibepiccashPlugin.kt @@ -1,4 +1,4 @@ -package com.example.flutter_libepiccash +package com.cypherstack.flutter_libepiccash import androidx.annotation.NonNull diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index a73777f..267c594 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -44,7 +44,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.flutter_libepiccash_example" + applicationId "com.cypherstack.flutter_libepiccash_example" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. minSdkVersion 18 diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml index 28d34fd..68cc4de 100644 --- a/example/android/app/src/debug/AndroidManifest.xml +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.cypherstack.flutter_libepiccash_example">