Skip to content

Commit

Permalink
Merge pull request #127 from LtbLightning/minor-changes
Browse files Browse the repository at this point in the history
Minor changes
  • Loading branch information
BitcoinZavior authored Mar 28, 2024
2 parents ec2ed3e + 0f14091 commit 6453058
Show file tree
Hide file tree
Showing 12 changed files with 719 additions and 352 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/precompile_binaries.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [v0.31.0-dev, master]
branches: [v0.31.0-dev, master, main]

name: Precompile Binaries

Expand Down
16 changes: 10 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
[0.31.0-dev]
## [0.31.0-dev]
Updated Rust and Flutter dependencies.
#### APIs added
- Add sealed class `Auth` in `RpcConfig`.
- Made `PartiallySignedTransaction` class mutable.

#### Fixed
- Functions hang indefinitely on iOs devices
#### Changed
- Replace `AddressIndex`'s `new` with`increase`.
- Renamed `Address`'s create to `fromString`.
- txBuilder.finish returns a tuple.
- `txBuilder.finish` returns a tuple.
- Added `cargokit` to handle rust binary build

#### Fixed
- Functions hang indefinitely on iOS devices.
- Thread `frb_workerpool` panicked.

## [0.30.0]
Updated Rust and Flutter dependencies.
macOs support bug resolved
MacOS support bug resolved
#### APIs added
- Add BIP-86 descriptor template

## [0.29.2]
Support macOs and unit testing.
Support MacOS and unit testing.
Updated flutter dependencies.

## [0.29.1]
Expand Down
47 changes: 3 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,58 +176,17 @@ final internalAddress =

The latest API documentation is available [here](https://pub.dev/documentation/bdk_flutter/latest/bdk_flutter/bdk_flutter-library.html)

### Example Projects
### Example Projects

- **\*BDK Flutter Demo App:** The [BDK Flutter Demo App](https://github.com/LtbLightning/bdk-flutter-quickstart)
is a simple bitcoin app built in flutter to serve as a reference app to demonstrate `bdk-flutter` api usage.

### How to build

_Note that Flutter version `3.0` or later is required to build the plugin._

1. Install `Rust` and `Cargo`
The easiest way to get Cargo is to install the current stable release of Rust by using [rustup](https://doc.rust-lang.org/cargo/getting-started/installation.html). Installing Rust using rustup will also install cargo.

2. Clone this repository

```shell
git clone https://github.com/LtbLightning/bdk-flutter
```

3. Activate dart `ffigen`

```shell
dart pub global activate ffigen
```

4. Android Setup

- The [Android NDK](https://developer.android.com/ndk), or Native Development Kit, enables code written in other languages to be run on the JVM via the Java Native Interface, or JNI for short.
After following the instructions above, the NDK should be installed in your $ANDROID_SDK_HOME/ndk folder, where ANDROID_SDK_HOME usually is:
<br/> Windows: %APPDATA%\Local\Android\sdk
<br/> MacOS: ~/Library/Android/sdk

An [issue](https://github.com/rust-lang/rust/pull/85806) regarding building Rust's core library against the latest NDK means that as of writing only NDK versions 22 and older can be used.

You can alternatively use the latest version of the Android NDK which is greater than 22. However, this requires a hack to prevent the [`unable to find library -lgcc error`](https://github.com/rust-lang/rust/pull/85806#issuecomment-1096266946).

5. Build flutter bindings
Navigate to `rust` directory, and run the following commands
```shell
cargo build
make all
```

### _Generating Docs Manually (Optional)_

Please use the [Dart documentation generator](https://pub.dev/packages/dartdoc) to generate the API documentation.

### References:

- Setting up a local Esplora instance for testing:
https://bitcoin.stackexchange.com/questions/116937/how-do-i-setup-an-esplora-instance-for-local-testing/116938#116938

_Note: Caution this is Beta at this stage
Please consider reviewing, experimenting, and contributing ⚡️_
_Note: This Flutter plugin is currently in its development (dev) stage and has been released for community review and experimentation.
We warmly welcome feedback, bug reports, and contributions from developers and enthusiasts alike ⚡️_

Thanks for taking a look!
11 changes: 11 additions & 0 deletions check_precompiled.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

BASEDIR=$(dirname "$0")

cd $BASEDIR/cargokit/build_tool

# Check whether the precompiled binaries ara available for each architecture.
# Note: aaarch64-unknown-linux-gnu binary is missing as there is no
# cross-compilation available currently.

dart run build_tool verify-binaries --manifest-dir=../../rust
1 change: 0 additions & 1 deletion example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ migrate_working_dir/

# Flutter/Dart/Pub related
**/doc/api/
/pubspec.lock
/ios/Podfile.lock
**/ios/Flutter/.last_build_id
.dart_tool/
Expand Down
Loading

0 comments on commit 6453058

Please sign in to comment.