Skip to content

Commit

Permalink
Merge commit '35efa2a2886ce02a6e9e9c6a1b73f9912d5ce8b6' as 'cargokit'
Browse files Browse the repository at this point in the history
  • Loading branch information
BitcoinZavior committed Apr 14, 2024
1 parent 2761090 commit 0d9bc87
Show file tree
Hide file tree
Showing 202 changed files with 79,951 additions and 40 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/precompile_binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
push:
branches: [v0.31.2-dev, master, main]

name: Precompile Binaries

jobs:
Precompile:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- macOS-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Precompile (with iOS)
if: (matrix.os == 'macOS-latest')
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter
working-directory: cargokit/build_tool
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }}
- name: Precompile (with Android)
if: (matrix.os == 'ubuntu-20.04')
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23
working-directory: cargokit/build_tool
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }}
40 changes: 37 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
target
.dart_tool
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
.vscode/settings.json

# IntelliJ related
*.iml
!pubspec.lock
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.

**/doc/api/
.dart_tool/
.packages
build/
bdk.*/
*.xcframework
android/src/main/jniLibs/
rust/target/
rust/output.log


36 changes: 36 additions & 0 deletions .metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.

version:
revision: f92f44110e87bad5ff168335c36da6f6053036e6
channel: stable

project_type: plugin

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: f92f44110e87bad5ff168335c36da6f6053036e6
base_revision: f92f44110e87bad5ff168335c36da6f6053036e6
- platform: android
create_revision: f92f44110e87bad5ff168335c36da6f6053036e6
base_revision: f92f44110e87bad5ff168335c36da6f6053036e6
- platform: ios
create_revision: f92f44110e87bad5ff168335c36da6f6053036e6
base_revision: f92f44110e87bad5ff168335c36da6f6053036e6
- platform: macos
create_revision: f92f44110e87bad5ff168335c36da6f6053036e6
base_revision: f92f44110e87bad5ff168335c36da6f6053036e6

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
149 changes: 149 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
## [0.31.2-dev]
Updated Rust and Flutter dependencies.
#### APIs added
- Add `InvalidInputException`, `InvalidLockTimeException` & `InvalidTransactionException` .
#### Fixed
- Thread `frb_workerpool` panic on `UnknownUtxo` and `InvalidPsbtInput`.

## [0.31.1-dev]
#### Fixed
- Failed to load `.so` files in android.

## [0.31.0-dev]
Updated Rust and Flutter dependencies.
#### APIs added
- Add sealed class `Auth` in `RpcConfig`.
- Made `PartiallySignedTransaction` class mutable.

#### Changed
- Replace `AddressIndex`'s `new` with`increase`.
- Renamed `Address`'s create to `fromString`.
- `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
#### APIs added
- Add BIP-86 descriptor template

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

## [0.29.1]
Updated Rust and Flutter dependencies.
Exposed strongly-typed exceptions.

## [0.29.0]
Support Dart 3.
Updated Rust and Flutter dependencies.
#### APIs added
- Add `isMine` method to `Wallet`.
- Expose script.toBytes() method.

## [0.28.3]
### Fixed
- Multisig issue resolved by adding isMultiSig to signOptions.

## [0.28.2]
#### APIs added
- Expose `Wallet` class's `getDescriptorForKeyChain` and `getPsbtInput` functions.
- Expose `TxBuilder` class's `addForeignUtxo` function.
- Add `Input` class.
- Expose `Descriptor` class's `maxSatisfactionWeight` function.

## [0.28.1]
### Fixed
- Invalid UTF-8 error for txansaction.input().

## [0.28.0]
Updated Rust ( Bdk to latest version 0.28.0 ) and Flutter dependencies.
#### APIs added
- Expose `Address` class's `payload` and `network` functions
- Add `fromScript` constructor to `Address` class
- Add `SignOptions` to Wallet.sign() params.
- Add `jsonSerialize` function to `PartiallySignedTransaction`, to get the JSON serialized value of all PSBT fields.
- Expose `Transaction` class's `txid`, `weight`, `size`, `vsize`, `isCoinBase`, `isExplicitlyRbf`, `version`, `isLockTimeEnabled`, `lockTime`, `input` and `output` functions.

## [0.27.2]
### API changed
- txBuilder.finish() & bumpFeeTxBuilder.finish() returns a `TxBuilderResult` instead of a `PartiallySignedTransaction`.

## [0.27.1]
Updated Rust ( Bdk to latest version 0.27.1 ) and Flutter dependencies.
#### APIs added
- New `Transaction` class that can be created from or serialized to consensus encoded bytes.
- Add estimateFee(int Target) function for `Blockchain`
- Add getInternalAddress() function for `Wallet`
- Add AddressIndex.reset(int index) & AddressIndex.peek(int index)
#### APIs changed
- partiallySignedTransaction.extractTx() returns a `Transaction` instead of a the transaction bytes.
- blockchain.broadcast() takes a `Transaction` instead of a `PartiallySignedTransaction`

## [0.3.2]
### Fixed
- iOS build issue when using flavors
- Added toString method for all objects

## [0.3.1]
### Fixed
- Pub.dev analysis score
- Type mismatch for descriptorSecretKey

## [0.3.0]
Updated Rust ( Bdk to latest version 0.26.0 ) and Flutter dependencies.
#### APIs changed
- The descriptor and changeDescriptor arguments on the wallet constructor now take a `Descriptor` instead of a String.
#### APIs added
- Added RpcConfig, BlockchainConfig.rpc
- Added Descriptor type with the following named constructors:
- Default `create` constructor, that requires a descriptor in String format and a Network
- newBip44 constructor returns a Descriptor with structure pkh(key/44'/{0,1}'/0'/{0,1}/*)
- newBip44Public constructor returns a Descriptor with structure pkh(key/{0,1}/*)
- newBip49 constructor returns a Descriptor with structure sh(wpkh(key/49'/{0,1}'/0'/{0,1}/*))
- newBip49Public constructor returns a Descriptor with structure sh(wpkh(key/{0,1}/*))
- newBip84 constructor returns a Descriptor with structure wpkh(key/84'/{0,1}'/0'/{0,1}/*)
- newBip84Public constructor returns a Descriptor with structure wpkh(key/{0,1}/*)
- asString returns the public version of the output descriptor in String format
- asPrivateString returns the private version of the output descriptor if available, otherwise, return the public version

## [0.2.3]
### Fixed
- pub.dev analysis score

## [0.2.2]
### Fixed
- pub.dev analysis score

## [0.2.1]
### Fixed
- pub.dev static analysis warning
- removing internal helper functions from public api

## [0.2.0]
Updated API to match bdk-ffi

## [0.1.4]
#### Functionality Added
- Generate Mnemonic method
- Create Descriptors
- Create Extended Key
- Create XPriv
- Create XPub
- Create Wallet
- Get New Address
- Get Last Unused Address
- Get Balance
- Get Transactions
- Get Pending Transactions
- Get Confirmed Transactions
- Sync Wallet
- Create Transaction
- Sign Transaction
- Broadcast Transaction
- Quick Send
40 changes: 3 additions & 37 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,39 +1,5 @@
Copyright 2022 Matej Knopp
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:

================================================================================

MIT LICENSE

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.

================================================================================

APACHE LICENSE, VERSION 2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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.
Loading

0 comments on commit 0d9bc87

Please sign in to comment.