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/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 41cc7d8..2d1994c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ ## 0.0.1 -* TODO: Describe initial release. +* Uses Epic Post to cache slates + +## 0.0.2 diff --git a/LICENSE b/LICENSE index ba75c69..9316d42 100644 --- a/LICENSE +++ b/LICENSE @@ -1 +1,7 @@ -TODO: Add your license here. +Copyright 2022-2023 CypherStack LLC, written by tthe Cypher Stack team + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 7cf7e03..e31c77b 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` + +### 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 +``` +### 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,31 @@ cargo install cbindgen cd scripts/ios ./build_all +``` + +### Linux: + +``` +cd scripts/linux +./build_all.sh +``` + +### Windows: + +Cross compile: +``` +cd scripts/windows +./build_all.sh +``` + +Native build: +``` +cd scripts/windows +./build_all.ps1 +``` + +## Test +Run `flutter test` + +## Usage +See [Stack Wallet](https://github.com/cypherstack/stack_wallet) and [Epic Pay](https://github.com/cypherstack/epic-mobile) 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">