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

Rust review #8

Draft
wants to merge 115 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
913754c
update README
sneurlax Jan 25, 2023
31d9186
add testing note
sneurlax Jan 25, 2023
074e238
linting
sneurlax Feb 3, 2023
7d1b9c7
com.example -> com.cypherstack
sneurlax Feb 3, 2023
41d4736
update copyright messages
sneurlax Feb 3, 2023
8318b85
add Likho as author and add MIT license
sneurlax Feb 3, 2023
2e9fa22
update changelog
sneurlax Feb 3, 2023
f8f757e
linting
sneurlax Feb 3, 2023
670f3ce
bump version and update descriptions
sneurlax Feb 3, 2023
654bef9
linting
sneurlax Feb 3, 2023
de64ade
add io prefix to dart:io methods
sneurlax Feb 3, 2023
04065a8
remove MIT license
sneurlax Feb 6, 2023
4fb1ab9
Revert "remove MIT license"
sneurlax Feb 6, 2023
a277422
print literal
sneurlax Feb 14, 2023
c490c8f
remove deprecated RustcEncodable derive
sneurlax Feb 14, 2023
f177ed0
change package name
sneurlax Feb 14, 2023
b1e7ee2
remove unused import
sneurlax Feb 14, 2023
f44eb31
remove unused unit
sneurlax Feb 14, 2023
96ddd64
remove unused unit
sneurlax Feb 14, 2023
cebc846
remove unused unit
sneurlax Feb 14, 2023
ea9a395
remove unused unit
sneurlax Feb 14, 2023
41fe21e
fix error return and linting
sneurlax Feb 14, 2023
acc643d
denote variable as unused
sneurlax Feb 14, 2023
03b6667
Merge remote-tracking branch 'origin/implement-latest-epic-version' i…
sneurlax Feb 14, 2023
6a8c8f5
pass error
sneurlax Feb 14, 2023
eb2d03e
pass error as string
sneurlax Feb 14, 2023
0cb8c02
pass error
sneurlax Feb 14, 2023
abff4fd
error comment
sneurlax Feb 14, 2023
e97d39d
err -> e
sneurlax Feb 14, 2023
849ed8c
remove unused imports
sneurlax Feb 14, 2023
e387be1
remove unused stack_epic_wallet_controller import
sneurlax Feb 14, 2023
ebb7dd8
remove unused imports
sneurlax Feb 14, 2023
e638c1c
remove unused import
sneurlax Feb 14, 2023
6b51d88
remove unused import
sneurlax Feb 14, 2023
87ac72c
remove unused import
sneurlax Feb 14, 2023
2d5f87a
remove unused import
sneurlax Feb 14, 2023
484b7d1
remove unused import
sneurlax Feb 14, 2023
f5ab180
remove unused import
sneurlax Feb 14, 2023
268eb37
denote variable as unused
sneurlax Feb 14, 2023
f7855e7
denote variable as unused
sneurlax Feb 14, 2023
2d78e63
remove unnecessary unsafe
sneurlax Feb 14, 2023
9890340
safety comment
sneurlax Feb 14, 2023
edeb64b
return result directly
sneurlax Feb 14, 2023
b6d4b31
denote variable as unused
sneurlax Feb 14, 2023
9206c82
add safety comment
sneurlax Feb 14, 2023
8c1945e
return result directly
sneurlax Feb 14, 2023
7c34f2e
do not format unnecessarily
sneurlax Feb 14, 2023
ebab7b0
remove unnecessary to_string
sneurlax Feb 14, 2023
f0751ef
do not format unnecessarily
sneurlax Feb 14, 2023
6e295f4
do not format unnecessarily
sneurlax Feb 14, 2023
4a243b5
add safety comment
sneurlax Feb 14, 2023
1bf40b1
return result directly
sneurlax Feb 14, 2023
26204d2
return result directly
sneurlax Feb 14, 2023
e1a6c5c
use !matches macro
sneurlax Feb 14, 2023
cb840bc
return result directly
sneurlax Feb 14, 2023
d53b943
remove unnecessary cast
sneurlax Feb 14, 2023
e0bb413
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
f035bb3
remove unnecessary cast
sneurlax Feb 14, 2023
02e4552
return result directly
sneurlax Feb 14, 2023
ca2eb33
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
3c18867
return result directly
sneurlax Feb 14, 2023
1227625
remove immediately-dereferenced reference and do not clone unnecessarily
sneurlax Feb 14, 2023
c73365d
do not format unnecessarily
sneurlax Feb 14, 2023
646bbfd
return result directly
sneurlax Feb 14, 2023
d56caaf
use !matches macro
sneurlax Feb 14, 2023
c89e662
return result correctly
sneurlax Feb 14, 2023
0701dbb
return result directly
sneurlax Feb 14, 2023
2619c40
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
59c77b4
return result directly
sneurlax Feb 14, 2023
11370e0
return result directly
sneurlax Feb 14, 2023
8c5a190
use matches macro
sneurlax Feb 14, 2023
d5c4636
do not format unnecessarily
sneurlax Feb 14, 2023
2fbe8e2
return result directly
sneurlax Feb 14, 2023
614aefe
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
013efc1
return result directly
sneurlax Feb 14, 2023
94a5b18
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
893f997
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
83e8f56
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
2d12118
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
13f7c6d
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
c293ed9
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
366ba5f
remove unnecessary cast
sneurlax Feb 14, 2023
fd2b179
remove unnecessary cast
sneurlax Feb 14, 2023
f774172
remove unnecessary return
sneurlax Feb 14, 2023
411a8a9
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
319e383
remove unnecessary return
sneurlax Feb 14, 2023
99eeb4c
remove unnecessary return
sneurlax Feb 14, 2023
933ff2a
remove unnecessary return
sneurlax Feb 14, 2023
eba7f3c
remove unnecessary return
sneurlax Feb 14, 2023
693f60b
remove unnecessary return
sneurlax Feb 14, 2023
86add53
remove unnecessary return
sneurlax Feb 14, 2023
339c55f
remove unnecessary return
sneurlax Feb 14, 2023
b51780f
remove unnecessary return
sneurlax Feb 14, 2023
157f3df
remove unnecessary clone
sneurlax Feb 14, 2023
010cd17
remove unnecessary clone
sneurlax Feb 14, 2023
6943e93
remove unnecessary clone
sneurlax Feb 14, 2023
d50077d
remove unnecessary clone
sneurlax Feb 14, 2023
80c71e7
remove unnecessary clone
sneurlax Feb 14, 2023
4c7cc75
remove unnecessary clone
sneurlax Feb 14, 2023
0533bb0
remove unnecessary clone
sneurlax Feb 14, 2023
936adf2
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
7668e1d
remove unnecessary cast
sneurlax Feb 14, 2023
f2c9a62
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
43972a0
remove immediately-dereferenced reference
sneurlax Feb 14, 2023
2a4ff66
remove unnecessary cast
sneurlax Feb 14, 2023
2d3d2e5
linting
sneurlax Feb 14, 2023
7883f08
add safety TODOs
sneurlax Feb 14, 2023
2ed36e6
use matches macro
sneurlax Feb 14, 2023
7ab2e5c
camelCase->snake_case
sneurlax Feb 14, 2023
e156254
update README for linux and windows builds
sneurlax Feb 14, 2023
385d0cb
remove missing methods from headers
sneurlax Feb 21, 2023
27f8ea0
Update authoship in LICENSE
sneurlax Feb 24, 2023
47f4406
Update authorship in podscpec
sneurlax Feb 24, 2023
a8b6385
Update flutter_libepiccash.podspec
sneurlax Feb 24, 2023
b536db7
Update LICENSE
sneurlax Feb 24, 2023
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 0.0.1

* TODO: Describe initial release.
* Uses Epic Post to cache slates

## 0.0.2
8 changes: 7 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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.
50 changes: 40 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,63 @@
# 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
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)
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group 'com.example.flutter_libepiccash'
group 'com.cypherstack.flutter_libepiccash'
version '1.0-SNAPSHOT'

buildscript {
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.flutter_libepiccash">
package="com.cypherstack.flutter_libepiccash">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.flutter_libepiccash
package com.cypherstack.flutter_libepiccash

import androidx.annotation.NonNull

Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.flutter_libepiccash_example">
package="com.cypherstack.flutter_libepiccash_example">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.flutter_libepiccash_example">
package="com.cypherstack.flutter_libepiccash_example">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.flutter_libepiccash_example
package com.cypherstack.flutter_libepiccash_example

import io.flutter.embedding.android.FlutterActivity

Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.flutter_libepiccash_example">
package="com.cypherstack.flutter_libepiccash_example">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
6 changes: 3 additions & 3 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
);
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../ios/libs/";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterLibepiccashExample;
PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.flutterLibepiccashExample;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = "non-global";
Expand Down Expand Up @@ -503,7 +503,7 @@
);
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../ios/libs/";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterLibepiccashExample;
PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.flutterLibepiccashExample;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = "non-global";
Expand Down Expand Up @@ -531,7 +531,7 @@
);
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../ios/libs/";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterLibepiccashExample;
PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.flutterLibepiccashExample;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = "non-global";
Expand Down
10 changes: 5 additions & 5 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ class _MyHomePageState extends State<MyHomePage> {
final greeting = "";

Future<String> createFolder(String folderName) async {
Directory appDocDir = (await getApplicationDocumentsDirectory());
if (Platform.isIOS) {
io.Directory appDocDir = (await getApplicationDocumentsDirectory());
if (io.Platform.isIOS) {
appDocDir = (await getLibraryDirectory());
}
String appDocPath = appDocDir.path;
print(appDocPath);

Directory _appDocDir = (await getApplicationDocumentsDirectory());
if (Platform.isIOS) {
io.Directory _appDocDir = (await getApplicationDocumentsDirectory());
if (io.Platform.isIOS) {
_appDocDir = (await getLibraryDirectory());
}
final io.Directory _appDocDirFolder =
Expand All @@ -100,7 +100,7 @@ class _MyHomePageState extends State<MyHomePage> {

var config = {};
config["wallet_dir"] =
"/data/user/0/com.example.flutter_libepiccash_example/app_flutter/test/";
"/data/user/0/com.cypherstack.flutter_libepiccash_example/app_flutter/test/";
config["check_node_api_http_addr"] = "http://95.216.215.107:3413";
config["chain"] = "mainnet";
config["account"] = "default";
Expand Down
2 changes: 1 addition & 1 deletion example/lib/mnemonic_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class _EpicMnemonicView extends State<EpicMnemonicView> {
print("wallet dir ${config["wallet_dir"]}");
} else {
config["wallet_dir"] =
"/data/user/0/com.example.flutter_libepiccash_example/app_flutter/$name/";
"/data/user/0/com.cypherstack.flutter_libepiccash_example/app_flutter/$name/";
}
config["check_node_api_http_addr"] = "http://95.216.215.107:3413";
config["chain"] = "mainnet";
Expand Down
2 changes: 1 addition & 1 deletion example/lib/recover_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class _EpicRecoverWalletView extends State<EpicRecoverWalletView> {
String _getWalletConfig(name) {
var config = {};
config["wallet_dir"] =
"/data/user/0/com.example.flutter_libepiccash_example/app_flutter/$name/";
"/data/user/0/com.cypherstack.flutter_libepiccash_example/app_flutter/$name/";
config["check_node_api_http_addr"] = "http://95.216.215.107:3413";
config["chain"] = "mainnet";
config["account"] = "default";
Expand Down
2 changes: 1 addition & 1 deletion example/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(runner LANGUAGES CXX)
set(BINARY_NAME "flutter_libepiccash_example")
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "com.example.flutter_libepiccash")
set(APPLICATION_ID "com.cypherstack.flutter_libepiccash")

# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
Expand Down
4 changes: 2 additions & 2 deletions example/macos/Runner/Configs/AppInfo.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
PRODUCT_NAME = flutter_libepiccash_example

// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterLibepiccashExample
PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.flutterLibepiccashExample

// The copyright displayed in application information
PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved.
PRODUCT_COPYRIGHT = Copyright © 2022-203 CypherStack LLC. All rights reserved.
4 changes: 2 additions & 2 deletions example/windows/runner/Runner.rc
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ BEGIN
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "com.example" "\0"
VALUE "CompanyName", "com.cyperstack" "\0"
VALUE "FileDescription", "flutter_libepiccash_example" "\0"
VALUE "FileVersion", VERSION_AS_STRING "\0"
VALUE "InternalName", "flutter_libepiccash_example" "\0"
VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0"
VALUE "LegalCopyright", "Copyright (C) 2022-2023 CypherStack LLC. All rights reserved." "\0"
VALUE "OriginalFilename", "flutter_libepiccash_example.exe" "\0"
VALUE "ProductName", "flutter_libepiccash_example" "\0"
VALUE "ProductVersion", VERSION_AS_STRING "\0"
Expand Down
24 changes: 2 additions & 22 deletions ios/Classes/FlutterLibepiccashPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdlib.h>


@interface FlutterLibepiccashPlugin : NSObject<FlutterPlugin>
@interface FlutterLibepiccashPlugin : NSObject <FlutterPlugin>
@end

// NOTE: put the lines from the include here whenever new api functions are added.
Expand All @@ -18,7 +18,7 @@ const char *wallet_init(const char *config,
const char *get_mnemonic(void);

const char *rust_open_wallet(const char *config,
const char *password);
const char *password);

const char *rust_wallet_balances(const char *wallet,
const char *refresh,
Expand All @@ -33,12 +33,6 @@ const char *rust_wallet_scan_outputs(const char *wallet,
const char *start_height,
const char *number_of_blocks);

const char *rust_encrypt_slate(const char *wallet,
const char *to_address,
const char *secret_key_index,
const char *epicbox_config,
const char *slate);

const char *rust_create_tx(const char *wallet,
const char *amount,
const char *to_address,
Expand All @@ -50,13 +44,6 @@ const char *rust_txs_get(const char *wallet, const char *refresh_from_node);

const char *rust_tx_cancel(const char *wallet, const char *tx_id);

const char *rust_decrypt_unprocessed_slates(const char *wallet,
const char *secret_key_index,
const char *slates);

const char *rust_process_pending_slates(const char *wallet,
const char *slates);

const char *rust_get_chain_height(const char *config);

const char *rust_delete_wallet(const char *wallet);
Expand All @@ -71,13 +58,6 @@ const char *rust_get_tx_fees(const char *wallet,
const char *c_amount,
const char *min_confirmations);

const char *rust_post_slate_to_node(const char *wallet,
const char *tx_slate_id);

const char *subscribe_request(const char *wallet,
const char *secret_key_index,
const char *epicbox_config);

const char *rust_tx_send_http(const char *wallet,
const char *selection_strategy_is_use_all,
const char *minimum_confirmations,
Expand Down
6 changes: 4 additions & 2 deletions ios/Classes/FlutterLibepiccashPlugin.m
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#import "FlutterLibepiccashPlugin.h"

#if __has_include(<flutter_libepiccash/flutter_libepiccash-Swift.h>)
#import <flutter_libepiccash/flutter_libepiccash-Swift.h>
#else
// Support project import fallback if the generated compatibility header
// is not copied when this plugin is created as a library.
// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816
#import "flutter_libepiccash-Swift.h"

#endif

@implementation FlutterLibepiccashPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
[SwiftFlutterLibepiccashPlugin registerWithRegistrar:registrar];
+ (void)registerWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar {
[SwiftFlutterLibepiccashPlugin registerWithRegistrar:registrar];
}
@end
Loading