diff --git a/.githooks/pre-commit b/.githooks/pre-commit deleted file mode 100755 index 1674ddac..00000000 --- a/.githooks/pre-commit +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -printf "\e[33;1m%s\e[0m\n" 'Running flutter format' -dart format . -printf "\e[33;1m%s\e[0m\n" 'Running cargo fmt' -cd rust || exit -cargo fmt -cd ../ -git add . -printf "\e[33;1m%s\e[0m\n" 'Finished formatting' - -printf "\e[33;1m%s\e[0m\n" 'Running flutter analyze' -flutter analyze - if [ $? -ne 0 ] ; then - exit 1 -fi -printf "\e[33;1m%s\e[0m\n" 'Finished running flutter analyze' - -printf "\e[33;1m%s\e[0m\n" 'Running flutter test' -flutter test ./test/bdk_flutter_test.dart -if [ $? -ne 0 ] ; then - printf "\e[31;1m%s\e[0m\n" 'Mock tests error' - exit 1 -fi -printf "\e[33;1m%s\e[0m\n" 'Finished running flutter test' - -printf "\e[33;1m%s\e[0m\n" 'Running flutter publish --dry-run' -flutter pub publish --dry-run -if [ $? -ne 0 ] ; then - printf "\e[31;1m%s\e[0m\n" 'publish --dry-run error' - exit 1 -fi -printf "\e[33;1m%s\e[0m\n" 'Finished running flutter publish --dry-run' \ No newline at end of file diff --git a/.metadata b/.metadata index 3f061673..3e0ceadd 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled. version: - revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + revision: 796c8ef79279f9c774545b3771238c3098dbefab channel: stable project_type: plugin @@ -13,17 +13,17 @@ project_type: plugin migration: platforms: - platform: root - create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf - base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + create_revision: 796c8ef79279f9c774545b3771238c3098dbefab + base_revision: 796c8ef79279f9c774545b3771238c3098dbefab - platform: android - create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf - base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + create_revision: 796c8ef79279f9c774545b3771238c3098dbefab + base_revision: 796c8ef79279f9c774545b3771238c3098dbefab - platform: ios - create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf - base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + create_revision: 796c8ef79279f9c774545b3771238c3098dbefab + base_revision: 796c8ef79279f9c774545b3771238c3098dbefab - platform: macos - create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf - base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + create_revision: 796c8ef79279f9c774545b3771238c3098dbefab + base_revision: 796c8ef79279f9c774545b3771238c3098dbefab # User provided section diff --git a/CHANGELOG.md b/CHANGELOG.md index 394eb287..4fd8dc58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,17 @@ +## [0.29.2] +Support macOs and unit testing. + +Updated flutter dependencies. + ## [0.29.1] -Strongly typed exceptions + +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`. diff --git a/README.md b/README.md index 42ae3ae6..aff2317c 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To use the `bdk_flutter` package in your project, add it as a dependency in your ```dart dependencies: - bdk_flutter: ^0.29.1 + bdk_flutter: ^0.29.2 ``` ### Examples @@ -109,7 +109,7 @@ final feeRate = await estimateFeeRate(25); final txBuilderResult = await txBuilder.feeRate( feeRate.asSatPerVb() ) .addRecipient( script, 2000 ) .finish( bdkWallet ); - + final serializedPsbt = await txBuilderResult.psbt.jsonSerialize(); final jsonObject = json.decode(serializedPsbt); final outputs = jsonObject['unsigned_tx']['output'] as List; @@ -120,13 +120,13 @@ debugPrint("=========Inputs====="); debugPrint("amount: ${e['value']}"); debugPrint("script_pubkey: ${e['script_pubkey']}"); } - + debugPrint("=========Outputs====="); for (var e in outputs) { debugPrint("amount: ${e['value']}"); debugPrint("script_pubkey: ${e['script_pubkey']}"); } - + ``` ### Create an `internal` and `extarnal` wallet descriptors from derivation path. @@ -169,7 +169,7 @@ final address = await bdkWallet.getAddress(addressIndex: const AddressIndex()); final internalAddress = await bdkWallet.getInternalAddress(addressIndex: const AddressIndex()); - + ``` ### API Documentation @@ -219,10 +219,10 @@ _Note that Flutter version `3.0` or later is required to build the plugin._ 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 + 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 ⚡️_ diff --git a/analysis_options.yaml b/analysis_options.yaml index 148f627f..1e1867b7 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -18,3 +18,4 @@ analyzer: - lib/src/generated/bindings.dart - lib/src/generated/bridge_definitions.dart - lib/src/generated/bridge_definitions.freezed.dart + - README.md diff --git a/android/src/main/jniLibs/arm64-v8a/librust_bdk_ffi.so b/android/src/main/jniLibs/arm64-v8a/librust_bdk_ffi.so index 7ce1c089..379daea1 100755 Binary files a/android/src/main/jniLibs/arm64-v8a/librust_bdk_ffi.so and b/android/src/main/jniLibs/arm64-v8a/librust_bdk_ffi.so differ diff --git a/android/src/main/jniLibs/armeabi-v7a/librust_bdk_ffi.so b/android/src/main/jniLibs/armeabi-v7a/librust_bdk_ffi.so index 3148b57e..bb336f79 100755 Binary files a/android/src/main/jniLibs/armeabi-v7a/librust_bdk_ffi.so and b/android/src/main/jniLibs/armeabi-v7a/librust_bdk_ffi.so differ diff --git a/android/src/main/jniLibs/x86/librust_bdk_ffi.so b/android/src/main/jniLibs/x86/librust_bdk_ffi.so index 5b3ac480..8bc2f548 100755 Binary files a/android/src/main/jniLibs/x86/librust_bdk_ffi.so and b/android/src/main/jniLibs/x86/librust_bdk_ffi.so differ diff --git a/example/android/build.gradle b/example/android/build.gradle index a4d7066f..0ce09934 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/lib/bdk_library.dart b/example/lib/bdk_library.dart index 19caab2d..983b290f 100644 --- a/example/lib/bdk_library.dart +++ b/example/lib/bdk_library.dart @@ -136,6 +136,7 @@ class BdkLibrary { try { final txBuilder = TxBuilder(); final address = await Address.create(address: addressStr); + final script = await address.scriptPubKey(); final feeRate = await estimateFeeRate(25, blockchain); final txBuilderResult = await txBuilder @@ -143,12 +144,11 @@ class BdkLibrary { .feeRate(feeRate.asSatPerVb()) .finish(aliceWallet); getInputOutPuts(txBuilderResult, blockchain); - final aliceSbt = await aliceWallet.sign(psbt: txBuilderResult.psbt); final tx = await aliceSbt.extractTx(); Isolate.run(() async => {await blockchain.broadcast(tx)}); - } on FormatException catch (e) { - debugPrint(e.message); + } on Exception catch (_) { + rethrow; } } } diff --git a/example/macos/.gitignore b/example/macos/.gitignore new file mode 100644 index 00000000..746adbb6 --- /dev/null +++ b/example/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/example/macos/Flutter/Flutter-Debug.xcconfig b/example/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 00000000..4b81f9b2 --- /dev/null +++ b/example/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/example/macos/Flutter/Flutter-Release.xcconfig b/example/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 00000000..5caa9d15 --- /dev/null +++ b/example/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/example/macos/Flutter/GeneratedPluginRegistrant.swift b/example/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 00000000..cccf817a --- /dev/null +++ b/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,10 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { +} diff --git a/example/macos/Podfile b/example/macos/Podfile new file mode 100644 index 00000000..c795730d --- /dev/null +++ b/example/macos/Podfile @@ -0,0 +1,43 @@ +platform :osx, '10.14' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock new file mode 100644 index 00000000..3ab1a576 --- /dev/null +++ b/example/macos/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - FlutterMacOS (1.0.0) + +DEPENDENCIES: + - FlutterMacOS (from `Flutter/ephemeral`) + +EXTERNAL SOURCES: + FlutterMacOS: + :path: Flutter/ephemeral + +SPEC CHECKSUMS: + FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 + +PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 + +COCOAPODS: 1.11.3 diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..132afeba --- /dev/null +++ b/example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,785 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 59CCE2F02A8F8B1C0010CF57 /* librust_bdk_ffi.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 59CCE2EF2A8F8B1C0010CF57 /* librust_bdk_ffi.dylib */; settings = {ATTRIBUTES = (Weak, ); }; }; + 59CCE2F22A8F8B370010CF57 /* librust_bdk_ffi.dylib in Resources */ = {isa = PBXBuildFile; fileRef = 59CCE2F12A8F8B370010CF57 /* librust_bdk_ffi.dylib */; }; + 59CCE2F32A8F8B650010CF57 /* librust_bdk_ffi.dylib in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 59CCE2EF2A8F8B1C0010CF57 /* librust_bdk_ffi.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 827B5AC75EBC38150B769AF1 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9762042F8EEF7960F31A117D /* Pods_Runner.framework */; }; + 97E4E9B89842D6DF5968159B /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4225F4AA0D8239DE32B5281B /* Pods_RunnerTests.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 59CCE2F32A8F8B650010CF57 /* librust_bdk_ffi.dylib in Bundle Framework */, + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1EB253F5902F3A0233EE067F /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* flutter_bdk_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = flutter_bdk_example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 4225F4AA0D8239DE32B5281B /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4F08F86C7B84D515325B878E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 59CCE2EF2A8F8B1C0010CF57 /* librust_bdk_ffi.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = librust_bdk_ffi.dylib; path = ../../macos/librust_bdk_ffi.dylib; sourceTree = ""; }; + 59CCE2F12A8F8B370010CF57 /* librust_bdk_ffi.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = librust_bdk_ffi.dylib; path = ../../macos/librust_bdk_ffi.dylib; sourceTree = ""; }; + 6EE0C9DC606BA135AF52FB7D /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + 9762042F8EEF7960F31A117D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + ABEA50DBC911894CD2BE326D /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + C9C9FA351FB37699778EFEF2 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + F04F2570EDDB8C1D9BA6C7C9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 97E4E9B89842D6DF5968159B /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 59CCE2F02A8F8B1C0010CF57 /* librust_bdk_ffi.dylib in Frameworks */, + 827B5AC75EBC38150B769AF1 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 59CCE2F12A8F8B370010CF57 /* librust_bdk_ffi.dylib */, + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + 380997589BB18892A7F69A26 /* Pods */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* flutter_bdk_example.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + 380997589BB18892A7F69A26 /* Pods */ = { + isa = PBXGroup; + children = ( + F04F2570EDDB8C1D9BA6C7C9 /* Pods-Runner.debug.xcconfig */, + ABEA50DBC911894CD2BE326D /* Pods-Runner.release.xcconfig */, + 4F08F86C7B84D515325B878E /* Pods-Runner.profile.xcconfig */, + C9C9FA351FB37699778EFEF2 /* Pods-RunnerTests.debug.xcconfig */, + 1EB253F5902F3A0233EE067F /* Pods-RunnerTests.release.xcconfig */, + 6EE0C9DC606BA135AF52FB7D /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 59CCE2EF2A8F8B1C0010CF57 /* librust_bdk_ffi.dylib */, + 9762042F8EEF7960F31A117D /* Pods_Runner.framework */, + 4225F4AA0D8239DE32B5281B /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + BE6F456C0870678686AD3F25 /* [CP] Check Pods Manifest.lock */, + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + E4197FF910C9A96839BA2D2F /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* flutter_bdk_example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + 59CCE2F22A8F8B370010CF57 /* librust_bdk_ffi.dylib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; + BE6F456C0870678686AD3F25 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + E4197FF910C9A96839BA2D2F /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C9C9FA351FB37699778EFEF2 /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.flutterBdkExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flutter_bdk_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flutter_bdk_example"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1EB253F5902F3A0233EE067F /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.flutterBdkExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flutter_bdk_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flutter_bdk_example"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6EE0C9DC606BA135AF52FB7D /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.flutterBdkExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flutter_bdk_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flutter_bdk_example"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + "LIBRARY_SEARCH_PATHS[arch=*]" = "$PROJECT_DIR/../../macos"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + "LIBRARY_SEARCH_PATHS[arch=*]" = "$PROJECT_DIR/../../macos"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..432e7c4b --- /dev/null +++ b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/example/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..21a3cc14 --- /dev/null +++ b/example/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/macos/Runner/AppDelegate.swift b/example/macos/Runner/AppDelegate.swift new file mode 100644 index 00000000..d53ef643 --- /dev/null +++ b/example/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..a2ec33f1 --- /dev/null +++ b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 00000000..82b6f9d9 Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 00000000..13b35eba Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 00000000..0a3f5fa4 Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 00000000..bdb57226 Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 00000000..f083318e Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 00000000..326c0e72 Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 00000000..2f1632cf Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/example/macos/Runner/Base.lproj/MainMenu.xib b/example/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 00000000..80e867a4 --- /dev/null +++ b/example/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/macos/Runner/Configs/AppInfo.xcconfig b/example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 00000000..026b7720 --- /dev/null +++ b/example/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = flutter_bdk_example + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = io.bdk.f.flutterBdkExample + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2023 io.bdk.f. All rights reserved. diff --git a/example/macos/Runner/Configs/Debug.xcconfig b/example/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 00000000..36b0fd94 --- /dev/null +++ b/example/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/example/macos/Runner/Configs/Release.xcconfig b/example/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 00000000..dff4f495 --- /dev/null +++ b/example/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/example/macos/Runner/Configs/Warnings.xcconfig b/example/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 00000000..42bcbf47 --- /dev/null +++ b/example/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/example/macos/Runner/DebugProfile.entitlements b/example/macos/Runner/DebugProfile.entitlements new file mode 100644 index 00000000..08c3ab17 --- /dev/null +++ b/example/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,14 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + com.apple.security.network.client + + + diff --git a/example/macos/Runner/Info.plist b/example/macos/Runner/Info.plist new file mode 100644 index 00000000..4789daa6 --- /dev/null +++ b/example/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/example/macos/Runner/MainFlutterWindow.swift b/example/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 00000000..3cc05eb2 --- /dev/null +++ b/example/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/example/macos/Runner/Release.entitlements b/example/macos/Runner/Release.entitlements new file mode 100644 index 00000000..ee95ab7e --- /dev/null +++ b/example/macos/Runner/Release.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + + diff --git a/example/test/bdk_flutter_unit_tests.dart b/example/test/bdk_flutter_unit_tests.dart new file mode 100644 index 00000000..e8a190af --- /dev/null +++ b/example/test/bdk_flutter_unit_tests.dart @@ -0,0 +1,332 @@ +import 'dart:typed_data'; + +import 'package:bdk_flutter/bdk_flutter.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter_test/flutter_test.dart'; + +Future main() async { + const derivationPath = "m/44'/1'/0'"; + const script = [ + 118, + 169, + 20, + 159, + 154, + 122, + 189, + 96, + 12, + 12, + 170, + 3, + 152, + 58, + 119, + 200, + 195, + 223, + 142, + 6, + 44, + 178, + 250, + 136, + 172 + ]; + final address = + await Address.create(address: "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"); + final blockchain = await Blockchain.create( + config: const BlockchainConfig.electrum( + config: ElectrumConfig( + stopGap: 10, + timeout: 5, + retry: 5, + url: "ssl://electrum.blockstream.info:60002", + validateDomain: true))); + + Future getDescriptorSecretKey() async { + final mnemonic = await Mnemonic.fromString( + "chaos fabric time speed sponsor all flat solution wisdom trophy crack object robot pave observe combine where aware bench orient secret primary cable detect"); + return await DescriptorSecretKey.create( + network: Network.Testnet, mnemonic: mnemonic); + } + + Future deriveDescriptorSecretKey( + DescriptorSecretKey secretKey, String path) async { + return await secretKey.derive(await DerivationPath.create(path: path)); + } + + Future extendDescriptorSecretKey( + DescriptorSecretKey secretKey, String path) async { + return await secretKey.extend(await DerivationPath.create(path: path)); + } + + Future deriveDescriptorPublicKey( + DescriptorPublicKey publicKey, String path) async { + return await publicKey.derive(await DerivationPath.create(path: path)); + } + + Future extendDescriptorPublicKey( + DescriptorPublicKey publicKey, String path) async { + return await publicKey.extend(await DerivationPath.create(path: path)); + } + + Future getFundedWallet(String descriptor) async { + return await Wallet.create( + descriptor: (await Descriptor.create( + descriptor: descriptor, network: Network.Testnet)), + network: Network.Testnet, + databaseConfig: const DatabaseConfig.memory()); + } + + group('Address', () { + test('verify toString()', () async { + final res = address.toString(); + expect(res, "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"); + }); + test('verify scriptPubKey ()', () async { + final res = await address.scriptPubKey(); + expect(res.internal, script); + }); + test('verify scriptPubKey type()', () async { + final res = await address.scriptPubKey(); + expect(res.internal, isA()); + }); + test('verify network()', () async { + final res = await address.network(); + expect(res, Network.Testnet); + }); + test('verify payload()', () async { + final res = await address.payload(); + expect(res, isA()); + }); + }); + group('Blockchain', () { + test('verify getHeight() type', () async { + final res = await blockchain.getHeight(); + expect(res, isA()); + }); + test('verify getBlockHash() type', () async { + final height = await blockchain.getHeight(); + final res = await blockchain.getBlockHash(height); + expect(res, isA()); + }); + test('verify estimateFee() type', () async { + final res = await blockchain.estimateFee(25); + expect(res, isA()); + }); + }); + group('DerivationPath', () { + test('verify create() type', () async { + final res = await DerivationPath.create(path: "m/44h/1h/0h"); + expect(res.toString(), derivationPath); + }); + }); + group('Mnemonic', () { + test('verify mnemonic length; create()', () async { + for (var e in [WordCount.Words12, WordCount.Words18, WordCount.Words24]) { + final length = int.parse(e.name.split('s').last); + final res = await Mnemonic.create(e); + expect(res.asString().split(RegExp(r'\s+')).length, length); + } + }); + test('verify fromString()', () async { + final res = await Mnemonic.fromString( + "chaos fabric time speed sponsor all flat solution wisdom trophy crack object robot pave observe combine where aware bench orient secret primary cable detect"); + expect(res, isA()); + }); + }); + group('Descriptor', () { + //DescriptorSecretKey + test('verify generate_descriptor_secret_key', () async { + final res = await getDescriptorSecretKey(); + expect(res.asString(), + "tprv8ZgxMBicQKsPdWuqM1t1CDRvQtQuBPyfL6GbhQwtxDKgUAVPbxmj71pRA8raTqLrec5LyTs5TqCxdABcZr77bt2KyWA5bizJHnC4g4ysm4h/*"); + expect((await res.asPublic()).asString(), + "tpubD6NzVbkrYhZ4WywdEfYbbd62yuvqLjAZuPsNyvzCNV85JekAEMbKHWSHLF9h3j45SxewXDcLv328B1SEZrxg4iwGfmdt1pDFjZiTkGiFqGa/*"); + }); + test('_derive_self', () async { + final secretKey = await getDescriptorSecretKey(); + final derivedDsk = await deriveDescriptorSecretKey(secretKey, "m"); + expect(derivedDsk.asString(), + "[d1d04177]tprv8ZgxMBicQKsPdWuqM1t1CDRvQtQuBPyfL6GbhQwtxDKgUAVPbxmj71pRA8raTqLrec5LyTs5TqCxdABcZr77bt2KyWA5bizJHnC4g4ysm4h/*"); + final publicKey = await secretKey.asPublic(); + final derivedDpk = await deriveDescriptorPublicKey(publicKey, "m"); + expect(derivedDpk.asString(), + "[d1d04177]tpubD6NzVbkrYhZ4WywdEfYbbd62yuvqLjAZuPsNyvzCNV85JekAEMbKHWSHLF9h3j45SxewXDcLv328B1SEZrxg4iwGfmdt1pDFjZiTkGiFqGa/*"); + }); + + test('verify DescriptorSecretKey.create() type', () async { + final res = await getDescriptorSecretKey(); + expect(res, isA()); + }); + test('verify descriptorSecretKey.asPublic type', () async { + final res = await getDescriptorSecretKey(); + expect(await res.asPublic(), isA()); + }); + + test('verify descriptorSecretKey.secretBytes()', () async { + final res = await getDescriptorSecretKey(); + expect((await res.secretBytes()), [ + 233, + 51, + 21, + 214, + 206, + 64, + 30, + 180, + 219, + 128, + 58, + 86, + 35, + 47, + 14, + 211, + 230, + 155, + 5, + 55, + 116, + 230, + 4, + 125, + 245, + 79, + 27, + 208, + 14, + 94, + 169, + 54 + ]); + }); + test('verify descriptorSecretKey.extend()', () async { + expect( + (await extendDescriptorSecretKey( + await getDescriptorSecretKey(), derivationPath)) + .asString(), + "tprv8ZgxMBicQKsPdWuqM1t1CDRvQtQuBPyfL6GbhQwtxDKgUAVPbxmj71pRA8raTqLrec5LyTs5TqCxdABcZr77bt2KyWA5bizJHnC4g4ysm4h/44'/1'/0'/*"); + }); + test('verify descriptorSecretKey.derive()', () async { + expect( + ((await deriveDescriptorSecretKey( + await getDescriptorSecretKey(), derivationPath))) + .asString(), + "[d1d04177/44'/1'/0']tprv8g7MbPjRKU1LkemDd2cE1UWJwsEyVCDG5Wrs6JURJcdec9fMnvURoRqz68mKiJLXBiBiWc3aUVRL8RaGZPVWxFZ67btBuf1kp2Z5HLSwTGo/*"); + }); + test('verify DescriptorSecretKey.fromString', () async { + final res = await DescriptorSecretKey.fromString( + "[d1d04177/44'/1'/0']tprv8g7MbPjRKU1LkemDd2cE1UWJwsEyVCDG5Wrs6JURJcdec9fMnvURoRqz68mKiJLXBiBiWc3aUVRL8RaGZPVWxFZ67btBuf1kp2Z5HLSwTGo/*"); + expect(res.asString(), + "[d1d04177/44'/1'/0']tprv8g7MbPjRKU1LkemDd2cE1UWJwsEyVCDG5Wrs6JURJcdec9fMnvURoRqz68mKiJLXBiBiWc3aUVRL8RaGZPVWxFZ67btBuf1kp2Z5HLSwTGo/*"); + }); + // descriptorPublicKey + test('verify descriptorPublicKey.asString()', () async { + final res = await getDescriptorSecretKey(); + expect((await res.asPublic()).asString(), + "tpubD6NzVbkrYhZ4WywdEfYbbd62yuvqLjAZuPsNyvzCNV85JekAEMbKHWSHLF9h3j45SxewXDcLv328B1SEZrxg4iwGfmdt1pDFjZiTkGiFqGa/*"); + }); + test('verify descriptorPublicKey.extend()', () async { + final descriptorSecretKey = await getDescriptorSecretKey(); + final descriptorPublicKey = await descriptorSecretKey.asPublic(); + expect( + (await extendDescriptorPublicKey(descriptorPublicKey, derivationPath)) + .toString(), + "tpubD6NzVbkrYhZ4WywdEfYbbd62yuvqLjAZuPsNyvzCNV85JekAEMbKHWSHLF9h3j45SxewXDcLv328B1SEZrxg4iwGfmdt1pDFjZiTkGiFqGa/44'/1'/0'/*"); + }); + test('verify DescriptorPublicKey.fromString', () async { + expect( + (await DescriptorPublicKey.fromString( + "tpubD6NzVbkrYhZ4WywdEfYbbd62yuvqLjAZuPsNyvzCNV85JekAEMbKHWSHLF9h3j45SxewXDcLv328B1SEZrxg4iwGfmdt1pDFjZiTkGiFqGa/44'/1'/0'/*")) + .toString(), + "tpubD6NzVbkrYhZ4WywdEfYbbd62yuvqLjAZuPsNyvzCNV85JekAEMbKHWSHLF9h3j45SxewXDcLv328B1SEZrxg4iwGfmdt1pDFjZiTkGiFqGa/44'/1'/0'/*"); + }); + + test('verify Descriptor templates', () async { + final descriptorSecretKey = await getDescriptorSecretKey(); + debugPrint("DescriptorSecretKey: ${descriptorSecretKey.asString()}"); + final handmadePublic44 = await (await deriveDescriptorSecretKey( + descriptorSecretKey, "m/44h/1h/0h")) + .asPublic(); + debugPrint("Public 44: ${handmadePublic44.asString()}"); + final handmadePublic49 = await (await deriveDescriptorSecretKey( + descriptorSecretKey, "m/49h/1h/0h")) + .asPublic(); + + debugPrint("Public 49: ${handmadePublic49.asString()}"); + + final handmadePublic84 = await (await deriveDescriptorSecretKey( + descriptorSecretKey, "m/84h/1h/0h")) + .asPublic(); + + debugPrint("Public 84: ${handmadePublic84.asString()}"); + + final templatePrivate44 = await Descriptor.newBip44( + secretKey: descriptorSecretKey, + network: Network.Testnet, + keychain: KeychainKind.External); + final templatePrivate49 = await Descriptor.newBip49( + secretKey: descriptorSecretKey, + network: Network.Testnet, + keychain: KeychainKind.External); + final templatePrivate84 = await Descriptor.newBip84( + secretKey: descriptorSecretKey, + network: Network.Testnet, + keychain: KeychainKind.External); + debugPrint("Template 49: ${await templatePrivate44.asString()}"); + debugPrint("Template 44: ${await templatePrivate49.asString()}"); + debugPrint("Template 84: ${await templatePrivate84.asString()}"); + + final templatePublic44 = await Descriptor.newBip44Public( + publicKey: handmadePublic44, + network: Network.Testnet, + keychain: KeychainKind.External, + fingerPrint: 'd1d04177'); + final templatePublic49 = await Descriptor.newBip49Public( + publicKey: handmadePublic49, + network: Network.Testnet, + keychain: KeychainKind.External, + fingerPrint: 'd1d04177'); + final templatePublic84 = await Descriptor.newBip84Public( + publicKey: handmadePublic84, + network: Network.Testnet, + keychain: KeychainKind.External, + fingerPrint: 'd1d04177'); + expect(await templatePublic84.asString(), + await templatePublic84.asStringPrivate()); + expect(await templatePublic44.asString(), + await templatePublic44.asStringPrivate()); + expect(await templatePublic49.asString(), + await templatePublic49.asStringPrivate()); + // when using asString on a private key, we get the same result as when using it on a public key + expect( + await templatePublic84.asString(), await templatePublic84.asString()); + expect( + await templatePublic44.asString(), await templatePublic44.asString()); + expect( + await templatePublic49.asString(), await templatePublic49.asString()); + }); + }); + group('Psbt', () { + test('verify psbt_fee', () async { + const testWpkh = + "wpkh(cVpPVruEDdmutPzisEsYvtST1usBR3ntr8pXSyt6D2YYqXRyPcFW)"; + final wallet = await getFundedWallet(testWpkh); + await wallet.sync(blockchain); + const drainToAddress = "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt"; + final drainToScript = + await (await Address.create(address: drainToAddress)).scriptPubKey(); + final txBuilder = + TxBuilder().feeRate(2.0).drainWallet().drainTo(drainToScript); + final builderRes = await txBuilder.finish(wallet); + expect((await builderRes.psbt.feeRate() != null), true); + expect( + (await builderRes.psbt.feeRate())?.asSatPerVb(), 3.2113821506500244); + + expect((await builderRes.psbt.feeAmount() != null), true); + expect((await builderRes.psbt.feeAmount()), 1580); + }); + }); +} diff --git a/ios/Classes/bindings.h b/ios/Classes/bindings.h index 7e9b0302..f6800ef1 100644 --- a/ios/Classes/bindings.h +++ b/ios/Classes/bindings.h @@ -341,13 +341,13 @@ void wire_new_bip84_public__static_method__Api(int64_t port_, int32_t network, struct wire_uint_8_list *fingerprint); -void wire_as_string_private__static_method__Api(int64_t port_, - struct wire_uint_8_list *descriptor, - int32_t network); +void wire_descriptor_as_string_private__static_method__Api(int64_t port_, + struct wire_uint_8_list *descriptor, + int32_t network); -void wire_as_string__static_method__Api(int64_t port_, - struct wire_uint_8_list *descriptor, - int32_t network); +void wire_descriptor_as_string__static_method__Api(int64_t port_, + struct wire_uint_8_list *descriptor, + int32_t network); void wire_max_satisfaction_weight__static_method__Api(int64_t port_, struct wire_uint_8_list *descriptor, @@ -369,9 +369,11 @@ void wire_derive_descriptor_secret__static_method__Api(int64_t port_, struct wire_uint_8_list *secret, struct wire_uint_8_list *path); -void wire_as_secret_bytes__static_method__Api(int64_t port_, struct wire_uint_8_list *secret); +void wire_descriptor_secret_as_secret_bytes__static_method__Api(int64_t port_, + struct wire_uint_8_list *secret); -void wire_as_public__static_method__Api(int64_t port_, struct wire_uint_8_list *secret); +void wire_descriptor_secret_as_public__static_method__Api(int64_t port_, + struct wire_uint_8_list *secret); void wire_create_derivation_path__static_method__Api(int64_t port_, struct wire_uint_8_list *path); @@ -557,15 +559,15 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) wire_new_bip49_public__static_method__Api); dummy_var ^= ((int64_t) (void*) wire_new_bip84_descriptor__static_method__Api); dummy_var ^= ((int64_t) (void*) wire_new_bip84_public__static_method__Api); - dummy_var ^= ((int64_t) (void*) wire_as_string_private__static_method__Api); - dummy_var ^= ((int64_t) (void*) wire_as_string__static_method__Api); + dummy_var ^= ((int64_t) (void*) wire_descriptor_as_string_private__static_method__Api); + dummy_var ^= ((int64_t) (void*) wire_descriptor_as_string__static_method__Api); dummy_var ^= ((int64_t) (void*) wire_max_satisfaction_weight__static_method__Api); dummy_var ^= ((int64_t) (void*) wire_create_descriptor_secret__static_method__Api); dummy_var ^= ((int64_t) (void*) wire_descriptor_secret_from_string__static_method__Api); dummy_var ^= ((int64_t) (void*) wire_extend_descriptor_secret__static_method__Api); dummy_var ^= ((int64_t) (void*) wire_derive_descriptor_secret__static_method__Api); - dummy_var ^= ((int64_t) (void*) wire_as_secret_bytes__static_method__Api); - dummy_var ^= ((int64_t) (void*) wire_as_public__static_method__Api); + dummy_var ^= ((int64_t) (void*) wire_descriptor_secret_as_secret_bytes__static_method__Api); + dummy_var ^= ((int64_t) (void*) wire_descriptor_secret_as_public__static_method__Api); dummy_var ^= ((int64_t) (void*) wire_create_derivation_path__static_method__Api); dummy_var ^= ((int64_t) (void*) wire_descriptor_public_from_string__static_method__Api); dummy_var ^= ((int64_t) (void*) wire_create_descriptor_public__static_method__Api); diff --git a/ios/bdk_flutter.podspec b/ios/bdk_flutter.podspec index 0b303219..6125365c 100644 --- a/ios/bdk_flutter.podspec +++ b/ios/bdk_flutter.podspec @@ -4,17 +4,17 @@ # Pod::Spec.new do |s| s.name = 'bdk_flutter' - s.version = '0.29.1' + s.version = '0.29.2' s.summary = 'A Flutter library for the Bitcoin Development Kit (https://bitcoindevkit.org/)' s.description = <<-DESC A new Flutter project. -DESC -s.homepage = 'https://github.com/LtbLightning/bdk-flutter' -s.license = { :file => '../LICENSE' } -s.author = { 'Bitcoin Zavior' => 'BitcoinZavior@GMail.Com' } -s.source = { :path => '.' } -s.source_files = 'Classes/**/*' -s.dependency 'Flutter' + DESC + s.homepage = 'https://github.com/LtbLightning/bdk-flutter' + s.license = { :file => '../LICENSE' } + s.author = { 'Bitcoin Zavior' => 'BitcoinZavior@GMail.Com' } + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' s.platform = :ios, '12.0' # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' } diff --git a/ios/librust_bdk_ffi.a b/ios/librust_bdk_ffi.a index 921bc614..df263f3a 100644 Binary files a/ios/librust_bdk_ffi.a and b/ios/librust_bdk_ffi.a differ diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 00000000..35f36c4e --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,16 @@ +pre-commit: + commands: + lint_code: + glob: '*.dart' + run: dart fix lib --apply && git add . + format_code: + glob: '*.dart' + run: dart format . && git add . + +pre-push: + parallel: true + commands: + tests: + run: flutter test && flutter test example + static_code_analysis: + run: flutter analyze \ No newline at end of file diff --git a/lib/bdk_flutter.dart b/lib/bdk_flutter.dart index 8c49303e..7729dd55 100644 --- a/lib/bdk_flutter.dart +++ b/lib/bdk_flutter.dart @@ -5,7 +5,6 @@ export './src/generated/bridge_definitions.dart' hide RustBdkFfi, Script, - DescNetwork, BlockchainConfig_Electrum, BlockchainConfig_Rpc, BlockchainConfig_Esplora, @@ -15,13 +14,53 @@ export './src/generated/bridge_definitions.dart' AddressIndex_Peek, AddressIndex_New, AddressIndex_LastUnused, - BdkTxBuilderResult, Payload_PubkeyHash, Payload_ScriptHash, Payload_WitnessProgram, RbfValue, RbfValue_RbfDefault, RbfValue_Value, + Error, + Error_Bip32, + Error_BnBNoExactMatch, + Error_BnBTotalTriesExceeded, + Error_ChecksumMismatch, + Error_Descriptor, + Error_Electrum, + Error_Encode, + Error_Esplora, + Error_FeeRateTooLow, + Error_FeeRateUnavailable, + Error_FeeTooLow, + Error_Generic, + Error_Hex, + Error_InsufficientFunds, + Error_InvalidNetwork, + Error_InvalidOutpoint, + Error_InvalidPolicyPathError, + Error_InvalidU32Bytes, + Error_IrreplaceableTransaction, + Error_Json, + Error_Key, + Error_Miniscript, + Error_MiniscriptPsbt, + Error_MissingCachedScripts, + Error_MissingKeyOrigin, + Error_NoRecipients, + Error_NoUtxosSelected, + Error_OutputBelowDustLimit, + Error_Psbt, + Error_PsbtParse, + Error_Rpc, + Error_Rusqlite, + Error_ScriptDoesntHaveAddressForm, + Error_Secp256k1, + Error_Signer, + Error_Sled, + Error_SpendingPolicyRequired, + Error_TransactionConfirmed, + Error_TransactionNotFound, + Error_UnknownUtxo, DatabaseConfig_Sled; export './src/root.dart'; -export 'src/utils/exceptions.dart'; +export 'src/utils/exceptions.dart' hide BdkFfiException, handleBdkException; diff --git a/lib/src/generated/bindings.dart b/lib/src/generated/bindings.dart index e40c13a7..f9e33d2a 100644 --- a/lib/src/generated/bindings.dart +++ b/lib/src/generated/bindings.dart @@ -1,5 +1,5 @@ // AUTO GENERATED FILE, DO NOT EDIT. -// Generated by `flutter_rust_bridge`@ 1.78.0. +// Generated by `flutter_rust_bridge`@ 1.82.1. // ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const import "bridge_definitions.dart"; @@ -19,149 +19,130 @@ import 'dart:ffi' as ffi; class RustBdkFfiImpl implements RustBdkFfi { final RustBdkFfiPlatform _platform; - factory RustBdkFfiImpl(ExternalLibrary dylib) => - RustBdkFfiImpl.raw(RustBdkFfiPlatform(dylib)); + factory RustBdkFfiImpl(ExternalLibrary dylib) => RustBdkFfiImpl.raw(RustBdkFfiPlatform(dylib)); /// Only valid on web/WASM platforms. - factory RustBdkFfiImpl.wasm(FutureOr module) => - RustBdkFfiImpl(module as ExternalLibrary); + factory RustBdkFfiImpl.wasm(FutureOr module) => RustBdkFfiImpl(module as ExternalLibrary); RustBdkFfiImpl.raw(this._platform); - Future createBlockchainStaticMethodApi( - {required BlockchainConfig config, dynamic hint}) { + Future createBlockchainStaticMethodApi({required BlockchainConfig config, dynamic hint}) { var arg0 = _platform.api2wire_box_autoadd_blockchain_config(config); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_create_blockchain__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_create_blockchain__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kCreateBlockchainStaticMethodApiConstMeta, argValues: [config], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kCreateBlockchainStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "create_blockchain__static_method__Api", - argNames: ["config"], - ); + FlutterRustBridgeTaskConstMeta get kCreateBlockchainStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( + debugName: "create_blockchain__static_method__Api", + argNames: ["config"], + ); - Future getHeightStaticMethodApi( - {required String blockchainId, dynamic hint}) { + Future getHeightStaticMethodApi({required String blockchainId, dynamic hint}) { var arg0 = _platform.api2wire_String(blockchainId); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_get_height__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_get_height__static_method__Api(port_, arg0), parseSuccessData: _wire2api_u32, + parseErrorData: _wire2api_error, constMeta: kGetHeightStaticMethodApiConstMeta, argValues: [blockchainId], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kGetHeightStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kGetHeightStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "get_height__static_method__Api", argNames: ["blockchainId"], ); Future getBlockchainHashStaticMethodApi( - {required int blockchainHeight, - required String blockchainId, - dynamic hint}) { + {required int blockchainHeight, required String blockchainId, dynamic hint}) { var arg0 = api2wire_u32(blockchainHeight); var arg1 = _platform.api2wire_String(blockchainId); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_get_blockchain_hash__static_method__Api(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_get_blockchain_hash__static_method__Api(port_, arg0, arg1), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kGetBlockchainHashStaticMethodApiConstMeta, argValues: [blockchainHeight, blockchainId], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kGetBlockchainHashStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "get_blockchain_hash__static_method__Api", - argNames: ["blockchainHeight", "blockchainId"], - ); + FlutterRustBridgeTaskConstMeta get kGetBlockchainHashStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( + debugName: "get_blockchain_hash__static_method__Api", + argNames: ["blockchainHeight", "blockchainId"], + ); - Future estimateFeeStaticMethodApi( - {required int target, required String blockchainId, dynamic hint}) { + Future estimateFeeStaticMethodApi({required int target, required String blockchainId, dynamic hint}) { var arg0 = _platform.api2wire_u64(target); var arg1 = _platform.api2wire_String(blockchainId); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_estimate_fee__static_method__Api(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_estimate_fee__static_method__Api(port_, arg0, arg1), parseSuccessData: _wire2api_f32, + parseErrorData: _wire2api_error, constMeta: kEstimateFeeStaticMethodApiConstMeta, argValues: [target, blockchainId], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kEstimateFeeStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kEstimateFeeStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "estimate_fee__static_method__Api", argNames: ["target", "blockchainId"], ); - Future broadcastStaticMethodApi( - {required String tx, required String blockchainId, dynamic hint}) { + Future broadcastStaticMethodApi({required String tx, required String blockchainId, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); var arg1 = _platform.api2wire_String(blockchainId); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_broadcast__static_method__Api(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_broadcast__static_method__Api(port_, arg0, arg1), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kBroadcastStaticMethodApiConstMeta, argValues: [tx, blockchainId], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kBroadcastStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kBroadcastStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "broadcast__static_method__Api", argNames: ["tx", "blockchainId"], ); - Future createTransactionStaticMethodApi( - {required Uint8List tx, dynamic hint}) { + Future createTransactionStaticMethodApi({required Uint8List tx, dynamic hint}) { var arg0 = _platform.api2wire_uint_8_list(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_create_transaction__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_create_transaction__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kCreateTransactionStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kCreateTransactionStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "create_transaction__static_method__Api", - argNames: ["tx"], - ); + FlutterRustBridgeTaskConstMeta get kCreateTransactionStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( + debugName: "create_transaction__static_method__Api", + argNames: ["tx"], + ); Future txTxidStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_tx_txid__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_tx_txid__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kTxTxidStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kTxTxidStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kTxTxidStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "tx_txid__static_method__Api", argNames: ["tx"], ); @@ -169,17 +150,16 @@ class RustBdkFfiImpl implements RustBdkFfi { Future weightStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_weight__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_weight__static_method__Api(port_, arg0), parseSuccessData: _wire2api_u64, + parseErrorData: null, constMeta: kWeightStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kWeightStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kWeightStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "weight__static_method__Api", argNames: ["tx"], ); @@ -187,17 +167,16 @@ class RustBdkFfiImpl implements RustBdkFfi { Future sizeStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_size__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_size__static_method__Api(port_, arg0), parseSuccessData: _wire2api_u64, + parseErrorData: null, constMeta: kSizeStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kSizeStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kSizeStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "size__static_method__Api", argNames: ["tx"], ); @@ -205,36 +184,33 @@ class RustBdkFfiImpl implements RustBdkFfi { Future vsizeStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_vsize__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_vsize__static_method__Api(port_, arg0), parseSuccessData: _wire2api_u64, + parseErrorData: null, constMeta: kVsizeStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kVsizeStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kVsizeStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "vsize__static_method__Api", argNames: ["tx"], ); - Future serializeTxStaticMethodApi( - {required String tx, dynamic hint}) { + Future serializeTxStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_serialize_tx__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_serialize_tx__static_method__Api(port_, arg0), parseSuccessData: _wire2api_uint_8_list, + parseErrorData: null, constMeta: kSerializeTxStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kSerializeTxStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kSerializeTxStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "serialize_tx__static_method__Api", argNames: ["tx"], ); @@ -242,74 +218,67 @@ class RustBdkFfiImpl implements RustBdkFfi { Future isCoinBaseStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_is_coin_base__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_is_coin_base__static_method__Api(port_, arg0), parseSuccessData: _wire2api_bool, + parseErrorData: null, constMeta: kIsCoinBaseStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kIsCoinBaseStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kIsCoinBaseStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "is_coin_base__static_method__Api", argNames: ["tx"], ); - Future isExplicitlyRbfStaticMethodApi( - {required String tx, dynamic hint}) { + Future isExplicitlyRbfStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_is_explicitly_rbf__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_is_explicitly_rbf__static_method__Api(port_, arg0), parseSuccessData: _wire2api_bool, + parseErrorData: null, constMeta: kIsExplicitlyRbfStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kIsExplicitlyRbfStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kIsExplicitlyRbfStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "is_explicitly_rbf__static_method__Api", argNames: ["tx"], ); - Future isLockTimeEnabledStaticMethodApi( - {required String tx, dynamic hint}) { + Future isLockTimeEnabledStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_is_lock_time_enabled__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_is_lock_time_enabled__static_method__Api(port_, arg0), parseSuccessData: _wire2api_bool, + parseErrorData: null, constMeta: kIsLockTimeEnabledStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kIsLockTimeEnabledStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "is_lock_time_enabled__static_method__Api", - argNames: ["tx"], - ); + FlutterRustBridgeTaskConstMeta get kIsLockTimeEnabledStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( + debugName: "is_lock_time_enabled__static_method__Api", + argNames: ["tx"], + ); Future versionStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_version__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_version__static_method__Api(port_, arg0), parseSuccessData: _wire2api_i32, + parseErrorData: null, constMeta: kVersionStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kVersionStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kVersionStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "version__static_method__Api", argNames: ["tx"], ); @@ -317,17 +286,16 @@ class RustBdkFfiImpl implements RustBdkFfi { Future lockTimeStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_lock_time__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_lock_time__static_method__Api(port_, arg0), parseSuccessData: _wire2api_u32, + parseErrorData: null, constMeta: kLockTimeStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kLockTimeStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kLockTimeStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "lock_time__static_method__Api", argNames: ["tx"], ); @@ -335,175 +303,158 @@ class RustBdkFfiImpl implements RustBdkFfi { Future> inputStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_input__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_input__static_method__Api(port_, arg0), parseSuccessData: _wire2api_list_tx_in, + parseErrorData: null, constMeta: kInputStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kInputStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kInputStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "input__static_method__Api", argNames: ["tx"], ); - Future> outputStaticMethodApi( - {required String tx, dynamic hint}) { + Future> outputStaticMethodApi({required String tx, dynamic hint}) { var arg0 = _platform.api2wire_String(tx); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_output__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_output__static_method__Api(port_, arg0), parseSuccessData: _wire2api_list_tx_out, + parseErrorData: null, constMeta: kOutputStaticMethodApiConstMeta, argValues: [tx], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kOutputStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kOutputStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "output__static_method__Api", argNames: ["tx"], ); - Future serializePsbtStaticMethodApi( - {required String psbtStr, dynamic hint}) { + Future serializePsbtStaticMethodApi({required String psbtStr, dynamic hint}) { var arg0 = _platform.api2wire_String(psbtStr); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_serialize_psbt__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_serialize_psbt__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kSerializePsbtStaticMethodApiConstMeta, argValues: [psbtStr], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kSerializePsbtStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kSerializePsbtStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "serialize_psbt__static_method__Api", argNames: ["psbtStr"], ); - Future psbtTxidStaticMethodApi( - {required String psbtStr, dynamic hint}) { + Future psbtTxidStaticMethodApi({required String psbtStr, dynamic hint}) { var arg0 = _platform.api2wire_String(psbtStr); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_psbt_txid__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_psbt_txid__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kPsbtTxidStaticMethodApiConstMeta, argValues: [psbtStr], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kPsbtTxidStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kPsbtTxidStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "psbt_txid__static_method__Api", argNames: ["psbtStr"], ); - Future extractTxStaticMethodApi( - {required String psbtStr, dynamic hint}) { + Future extractTxStaticMethodApi({required String psbtStr, dynamic hint}) { var arg0 = _platform.api2wire_String(psbtStr); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_extract_tx__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_extract_tx__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kExtractTxStaticMethodApiConstMeta, argValues: [psbtStr], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kExtractTxStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kExtractTxStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "extract_tx__static_method__Api", argNames: ["psbtStr"], ); - Future psbtFeeRateStaticMethodApi( - {required String psbtStr, dynamic hint}) { + Future psbtFeeRateStaticMethodApi({required String psbtStr, dynamic hint}) { var arg0 = _platform.api2wire_String(psbtStr); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_psbt_fee_rate__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_psbt_fee_rate__static_method__Api(port_, arg0), parseSuccessData: _wire2api_opt_box_autoadd_f32, + parseErrorData: null, constMeta: kPsbtFeeRateStaticMethodApiConstMeta, argValues: [psbtStr], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kPsbtFeeRateStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kPsbtFeeRateStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "psbt_fee_rate__static_method__Api", argNames: ["psbtStr"], ); - Future psbtFeeAmountStaticMethodApi( - {required String psbtStr, dynamic hint}) { + Future psbtFeeAmountStaticMethodApi({required String psbtStr, dynamic hint}) { var arg0 = _platform.api2wire_String(psbtStr); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_psbt_fee_amount__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_psbt_fee_amount__static_method__Api(port_, arg0), parseSuccessData: _wire2api_opt_box_autoadd_u64, + parseErrorData: null, constMeta: kPsbtFeeAmountStaticMethodApiConstMeta, argValues: [psbtStr], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kPsbtFeeAmountStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kPsbtFeeAmountStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "psbt_fee_amount__static_method__Api", argNames: ["psbtStr"], ); - Future combinePsbtStaticMethodApi( - {required String psbtStr, required String other, dynamic hint}) { + Future combinePsbtStaticMethodApi({required String psbtStr, required String other, dynamic hint}) { var arg0 = _platform.api2wire_String(psbtStr); var arg1 = _platform.api2wire_String(other); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_combine_psbt__static_method__Api(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_combine_psbt__static_method__Api(port_, arg0, arg1), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kCombinePsbtStaticMethodApiConstMeta, argValues: [psbtStr, other], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kCombinePsbtStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kCombinePsbtStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "combine_psbt__static_method__Api", argNames: ["psbtStr", "other"], ); - Future jsonSerializeStaticMethodApi( - {required String psbtStr, dynamic hint}) { + Future jsonSerializeStaticMethodApi({required String psbtStr, dynamic hint}) { var arg0 = _platform.api2wire_String(psbtStr); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_json_serialize__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_json_serialize__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kJsonSerializeStaticMethodApiConstMeta, argValues: [psbtStr], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kJsonSerializeStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kJsonSerializeStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "json_serialize__static_method__Api", argNames: ["psbtStr"], ); - Future txBuilderFinishStaticMethodApi( + Future<(String, TransactionDetails)> txBuilderFinishStaticMethodApi( {required String walletId, required List recipients, required List utxos, @@ -521,8 +472,7 @@ class RustBdkFfiImpl implements RustBdkFfi { var arg0 = _platform.api2wire_String(walletId); var arg1 = _platform.api2wire_list_script_amount(recipients); var arg2 = _platform.api2wire_list_out_point(utxos); - var arg3 = _platform - .api2wire_opt_box_autoadd___record__out_point_String_usize(foreignUtxo); + var arg3 = _platform.api2wire_opt_box_autoadd___record__out_point_String_usize(foreignUtxo); var arg4 = _platform.api2wire_list_out_point(unspendable); var arg5 = api2wire_change_spend_policy(changePolicy); var arg6 = manuallySelectedOnly; @@ -533,10 +483,10 @@ class RustBdkFfiImpl implements RustBdkFfi { var arg11 = _platform.api2wire_opt_box_autoadd_rbf_value(rbf); var arg12 = _platform.api2wire_uint_8_list(data); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_tx_builder_finish__static_method__Api(port_, arg0, arg1, arg2, - arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12), - parseSuccessData: _wire2api_bdk_tx_builder_result, + callFfi: (port_) => _platform.inner.wire_tx_builder_finish__static_method__Api( + port_, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12), + parseSuccessData: _wire2api___record__String_transaction_details, + parseErrorData: _wire2api_error, constMeta: kTxBuilderFinishStaticMethodApiConstMeta, argValues: [ walletId, @@ -557,8 +507,7 @@ class RustBdkFfiImpl implements RustBdkFfi { )); } - FlutterRustBridgeTaskConstMeta get kTxBuilderFinishStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kTxBuilderFinishStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "tx_builder_finish__static_method__Api", argNames: [ "walletId", @@ -577,7 +526,7 @@ class RustBdkFfiImpl implements RustBdkFfi { ], ); - Future bumpFeeTxBuilderFinishStaticMethodApi( + Future<(String, TransactionDetails)> bumpFeeTxBuilderFinishStaticMethodApi( {required String txid, required double feeRate, String? allowShrinking, @@ -593,82 +542,59 @@ class RustBdkFfiImpl implements RustBdkFfi { var arg5 = _platform.api2wire_opt_box_autoadd_u32(nSequence); return _platform.executeNormal(FlutterRustBridgeTask( callFfi: (port_) => _platform.inner - .wire_bump_fee_tx_builder_finish__static_method__Api( - port_, arg0, arg1, arg2, arg3, arg4, arg5), - parseSuccessData: _wire2api_bdk_tx_builder_result, + .wire_bump_fee_tx_builder_finish__static_method__Api(port_, arg0, arg1, arg2, arg3, arg4, arg5), + parseSuccessData: _wire2api___record__String_transaction_details, + parseErrorData: _wire2api_error, constMeta: kBumpFeeTxBuilderFinishStaticMethodApiConstMeta, - argValues: [ - txid, - feeRate, - allowShrinking, - walletId, - enableRbf, - nSequence - ], + argValues: [txid, feeRate, allowShrinking, walletId, enableRbf, nSequence], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kBumpFeeTxBuilderFinishStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "bump_fee_tx_builder_finish__static_method__Api", - argNames: [ - "txid", - "feeRate", - "allowShrinking", - "walletId", - "enableRbf", - "nSequence" - ], - ); - - Future createDescriptorStaticMethodApi( - {required String descriptor, required Network network, dynamic hint}) { + FlutterRustBridgeTaskConstMeta get kBumpFeeTxBuilderFinishStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "bump_fee_tx_builder_finish__static_method__Api", + argNames: ["txid", "feeRate", "allowShrinking", "walletId", "enableRbf", "nSequence"], + ); + + Future createDescriptorStaticMethodApi({required String descriptor, required Network network, dynamic hint}) { var arg0 = _platform.api2wire_String(descriptor); var arg1 = api2wire_network(network); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_create_descriptor__static_method__Api(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_create_descriptor__static_method__Api(port_, arg0, arg1), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kCreateDescriptorStaticMethodApiConstMeta, argValues: [descriptor, network], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kCreateDescriptorStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "create_descriptor__static_method__Api", - argNames: ["descriptor", "network"], - ); + FlutterRustBridgeTaskConstMeta get kCreateDescriptorStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( + debugName: "create_descriptor__static_method__Api", + argNames: ["descriptor", "network"], + ); Future newBip44DescriptorStaticMethodApi( - {required KeychainKind keyChainKind, - required String secretKey, - required Network network, - dynamic hint}) { + {required KeychainKind keyChainKind, required String secretKey, required Network network, dynamic hint}) { var arg0 = api2wire_keychain_kind(keyChainKind); var arg1 = _platform.api2wire_String(secretKey); var arg2 = api2wire_network(network); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_new_bip44_descriptor__static_method__Api( - port_, arg0, arg1, arg2), + callFfi: (port_) => _platform.inner.wire_new_bip44_descriptor__static_method__Api(port_, arg0, arg1, arg2), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kNewBip44DescriptorStaticMethodApiConstMeta, argValues: [keyChainKind, secretKey, network], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kNewBip44DescriptorStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "new_bip44_descriptor__static_method__Api", - argNames: ["keyChainKind", "secretKey", "network"], - ); + FlutterRustBridgeTaskConstMeta get kNewBip44DescriptorStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "new_bip44_descriptor__static_method__Api", + argNames: ["keyChainKind", "secretKey", "network"], + ); Future newBip44PublicStaticMethodApi( {required KeychainKind keyChainKind, @@ -681,47 +607,40 @@ class RustBdkFfiImpl implements RustBdkFfi { var arg2 = api2wire_network(network); var arg3 = _platform.api2wire_String(fingerprint); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_new_bip44_public__static_method__Api( - port_, arg0, arg1, arg2, arg3), + callFfi: (port_) => _platform.inner.wire_new_bip44_public__static_method__Api(port_, arg0, arg1, arg2, arg3), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kNewBip44PublicStaticMethodApiConstMeta, argValues: [keyChainKind, publicKey, network, fingerprint], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kNewBip44PublicStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kNewBip44PublicStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "new_bip44_public__static_method__Api", argNames: ["keyChainKind", "publicKey", "network", "fingerprint"], ); Future newBip49DescriptorStaticMethodApi( - {required KeychainKind keyChainKind, - required String secretKey, - required Network network, - dynamic hint}) { + {required KeychainKind keyChainKind, required String secretKey, required Network network, dynamic hint}) { var arg0 = api2wire_keychain_kind(keyChainKind); var arg1 = _platform.api2wire_String(secretKey); var arg2 = api2wire_network(network); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_new_bip49_descriptor__static_method__Api( - port_, arg0, arg1, arg2), + callFfi: (port_) => _platform.inner.wire_new_bip49_descriptor__static_method__Api(port_, arg0, arg1, arg2), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kNewBip49DescriptorStaticMethodApiConstMeta, argValues: [keyChainKind, secretKey, network], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kNewBip49DescriptorStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "new_bip49_descriptor__static_method__Api", - argNames: ["keyChainKind", "secretKey", "network"], - ); + FlutterRustBridgeTaskConstMeta get kNewBip49DescriptorStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "new_bip49_descriptor__static_method__Api", + argNames: ["keyChainKind", "secretKey", "network"], + ); Future newBip49PublicStaticMethodApi( {required KeychainKind keyChainKind, @@ -734,47 +653,40 @@ class RustBdkFfiImpl implements RustBdkFfi { var arg2 = api2wire_network(network); var arg3 = _platform.api2wire_String(fingerprint); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_new_bip49_public__static_method__Api( - port_, arg0, arg1, arg2, arg3), + callFfi: (port_) => _platform.inner.wire_new_bip49_public__static_method__Api(port_, arg0, arg1, arg2, arg3), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kNewBip49PublicStaticMethodApiConstMeta, argValues: [keyChainKind, publicKey, network, fingerprint], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kNewBip49PublicStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kNewBip49PublicStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "new_bip49_public__static_method__Api", argNames: ["keyChainKind", "publicKey", "network", "fingerprint"], ); Future newBip84DescriptorStaticMethodApi( - {required KeychainKind keyChainKind, - required String secretKey, - required Network network, - dynamic hint}) { + {required KeychainKind keyChainKind, required String secretKey, required Network network, dynamic hint}) { var arg0 = api2wire_keychain_kind(keyChainKind); var arg1 = _platform.api2wire_String(secretKey); var arg2 = api2wire_network(network); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_new_bip84_descriptor__static_method__Api( - port_, arg0, arg1, arg2), + callFfi: (port_) => _platform.inner.wire_new_bip84_descriptor__static_method__Api(port_, arg0, arg1, arg2), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kNewBip84DescriptorStaticMethodApiConstMeta, argValues: [keyChainKind, secretKey, network], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kNewBip84DescriptorStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "new_bip84_descriptor__static_method__Api", - argNames: ["keyChainKind", "secretKey", "network"], - ); + FlutterRustBridgeTaskConstMeta get kNewBip84DescriptorStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "new_bip84_descriptor__static_method__Api", + argNames: ["keyChainKind", "secretKey", "network"], + ); Future newBip84PublicStaticMethodApi( {required KeychainKind keyChainKind, @@ -787,59 +699,57 @@ class RustBdkFfiImpl implements RustBdkFfi { var arg2 = api2wire_network(network); var arg3 = _platform.api2wire_String(fingerprint); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_new_bip84_public__static_method__Api( - port_, arg0, arg1, arg2, arg3), + callFfi: (port_) => _platform.inner.wire_new_bip84_public__static_method__Api(port_, arg0, arg1, arg2, arg3), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kNewBip84PublicStaticMethodApiConstMeta, argValues: [keyChainKind, publicKey, network, fingerprint], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kNewBip84PublicStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( + FlutterRustBridgeTaskConstMeta get kNewBip84PublicStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "new_bip84_public__static_method__Api", argNames: ["keyChainKind", "publicKey", "network", "fingerprint"], ); - Future asStringPrivateStaticMethodApi( + Future descriptorAsStringPrivateStaticMethodApi( {required String descriptor, required Network network, dynamic hint}) { var arg0 = _platform.api2wire_String(descriptor); var arg1 = api2wire_network(network); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_as_string_private__static_method__Api(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_descriptor_as_string_private__static_method__Api(port_, arg0, arg1), parseSuccessData: _wire2api_String, - constMeta: kAsStringPrivateStaticMethodApiConstMeta, + parseErrorData: _wire2api_error, + constMeta: kDescriptorAsStringPrivateStaticMethodApiConstMeta, argValues: [descriptor, network], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kAsStringPrivateStaticMethodApiConstMeta => + FlutterRustBridgeTaskConstMeta get kDescriptorAsStringPrivateStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "as_string_private__static_method__Api", + debugName: "descriptor_as_string_private__static_method__Api", argNames: ["descriptor", "network"], ); - Future asStringStaticMethodApi( + Future descriptorAsStringStaticMethodApi( {required String descriptor, required Network network, dynamic hint}) { var arg0 = _platform.api2wire_String(descriptor); var arg1 = api2wire_network(network); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_as_string__static_method__Api(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_descriptor_as_string__static_method__Api(port_, arg0, arg1), parseSuccessData: _wire2api_String, - constMeta: kAsStringStaticMethodApiConstMeta, + parseErrorData: _wire2api_error, + constMeta: kDescriptorAsStringStaticMethodApiConstMeta, argValues: [descriptor, network], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kAsStringStaticMethodApiConstMeta => + FlutterRustBridgeTaskConstMeta get kDescriptorAsStringStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "as_string__static_method__Api", + debugName: "descriptor_as_string__static_method__Api", argNames: ["descriptor", "network"], ); @@ -848,327 +758,291 @@ class RustBdkFfiImpl implements RustBdkFfi { var arg0 = _platform.api2wire_String(descriptor); var arg1 = api2wire_network(network); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_max_satisfaction_weight__static_method__Api(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_max_satisfaction_weight__static_method__Api(port_, arg0, arg1), parseSuccessData: _wire2api_usize, + parseErrorData: _wire2api_error, constMeta: kMaxSatisfactionWeightStaticMethodApiConstMeta, argValues: [descriptor, network], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kMaxSatisfactionWeightStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "max_satisfaction_weight__static_method__Api", - argNames: ["descriptor", "network"], - ); + FlutterRustBridgeTaskConstMeta get kMaxSatisfactionWeightStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "max_satisfaction_weight__static_method__Api", + argNames: ["descriptor", "network"], + ); Future createDescriptorSecretStaticMethodApi( - {required Network network, - required String mnemonic, - String? password, - dynamic hint}) { + {required Network network, required String mnemonic, String? password, dynamic hint}) { var arg0 = api2wire_network(network); var arg1 = _platform.api2wire_String(mnemonic); var arg2 = _platform.api2wire_opt_String(password); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_create_descriptor_secret__static_method__Api( - port_, arg0, arg1, arg2), + callFfi: (port_) => _platform.inner.wire_create_descriptor_secret__static_method__Api(port_, arg0, arg1, arg2), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kCreateDescriptorSecretStaticMethodApiConstMeta, argValues: [network, mnemonic, password], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kCreateDescriptorSecretStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "create_descriptor_secret__static_method__Api", - argNames: ["network", "mnemonic", "password"], - ); + FlutterRustBridgeTaskConstMeta get kCreateDescriptorSecretStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "create_descriptor_secret__static_method__Api", + argNames: ["network", "mnemonic", "password"], + ); - Future descriptorSecretFromStringStaticMethodApi( - {required String secret, dynamic hint}) { + Future descriptorSecretFromStringStaticMethodApi({required String secret, dynamic hint}) { var arg0 = _platform.api2wire_String(secret); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_descriptor_secret_from_string__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_descriptor_secret_from_string__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_FrbAnyhowException, constMeta: kDescriptorSecretFromStringStaticMethodApiConstMeta, argValues: [secret], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kDescriptorSecretFromStringStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "descriptor_secret_from_string__static_method__Api", - argNames: ["secret"], - ); + FlutterRustBridgeTaskConstMeta get kDescriptorSecretFromStringStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "descriptor_secret_from_string__static_method__Api", + argNames: ["secret"], + ); - Future extendDescriptorSecretStaticMethodApi( - {required String secret, required String path, dynamic hint}) { + Future extendDescriptorSecretStaticMethodApi({required String secret, required String path, dynamic hint}) { var arg0 = _platform.api2wire_String(secret); var arg1 = _platform.api2wire_String(path); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_extend_descriptor_secret__static_method__Api(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_extend_descriptor_secret__static_method__Api(port_, arg0, arg1), parseSuccessData: _wire2api_String, + parseErrorData: null, constMeta: kExtendDescriptorSecretStaticMethodApiConstMeta, argValues: [secret, path], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kExtendDescriptorSecretStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "extend_descriptor_secret__static_method__Api", - argNames: ["secret", "path"], - ); + FlutterRustBridgeTaskConstMeta get kExtendDescriptorSecretStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "extend_descriptor_secret__static_method__Api", + argNames: ["secret", "path"], + ); - Future deriveDescriptorSecretStaticMethodApi( - {required String secret, required String path, dynamic hint}) { + Future deriveDescriptorSecretStaticMethodApi({required String secret, required String path, dynamic hint}) { var arg0 = _platform.api2wire_String(secret); var arg1 = _platform.api2wire_String(path); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_derive_descriptor_secret__static_method__Api(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_derive_descriptor_secret__static_method__Api(port_, arg0, arg1), parseSuccessData: _wire2api_String, + parseErrorData: null, constMeta: kDeriveDescriptorSecretStaticMethodApiConstMeta, argValues: [secret, path], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kDeriveDescriptorSecretStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "derive_descriptor_secret__static_method__Api", - argNames: ["secret", "path"], - ); + FlutterRustBridgeTaskConstMeta get kDeriveDescriptorSecretStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "derive_descriptor_secret__static_method__Api", + argNames: ["secret", "path"], + ); - Future asSecretBytesStaticMethodApi( - {required String secret, dynamic hint}) { + Future descriptorSecretAsSecretBytesStaticMethodApi({required String secret, dynamic hint}) { var arg0 = _platform.api2wire_String(secret); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_as_secret_bytes__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_descriptor_secret_as_secret_bytes__static_method__Api(port_, arg0), parseSuccessData: _wire2api_uint_8_list, - constMeta: kAsSecretBytesStaticMethodApiConstMeta, + parseErrorData: _wire2api_error, + constMeta: kDescriptorSecretAsSecretBytesStaticMethodApiConstMeta, argValues: [secret], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kAsSecretBytesStaticMethodApiConstMeta => + FlutterRustBridgeTaskConstMeta get kDescriptorSecretAsSecretBytesStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "as_secret_bytes__static_method__Api", + debugName: "descriptor_secret_as_secret_bytes__static_method__Api", argNames: ["secret"], ); - Future asPublicStaticMethodApi( - {required String secret, dynamic hint}) { + Future descriptorSecretAsPublicStaticMethodApi({required String secret, dynamic hint}) { var arg0 = _platform.api2wire_String(secret); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => - _platform.inner.wire_as_public__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_descriptor_secret_as_public__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, - constMeta: kAsPublicStaticMethodApiConstMeta, + parseErrorData: _wire2api_error, + constMeta: kDescriptorSecretAsPublicStaticMethodApiConstMeta, argValues: [secret], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kAsPublicStaticMethodApiConstMeta => + FlutterRustBridgeTaskConstMeta get kDescriptorSecretAsPublicStaticMethodApiConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "as_public__static_method__Api", + debugName: "descriptor_secret_as_public__static_method__Api", argNames: ["secret"], ); - Future createDerivationPathStaticMethodApi( - {required String path, dynamic hint}) { + Future createDerivationPathStaticMethodApi({required String path, dynamic hint}) { var arg0 = _platform.api2wire_String(path); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_create_derivation_path__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_create_derivation_path__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kCreateDerivationPathStaticMethodApiConstMeta, argValues: [path], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kCreateDerivationPathStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "create_derivation_path__static_method__Api", - argNames: ["path"], - ); + FlutterRustBridgeTaskConstMeta get kCreateDerivationPathStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "create_derivation_path__static_method__Api", + argNames: ["path"], + ); - Future descriptorPublicFromStringStaticMethodApi( - {required String publicKey, dynamic hint}) { + Future descriptorPublicFromStringStaticMethodApi({required String publicKey, dynamic hint}) { var arg0 = _platform.api2wire_String(publicKey); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_descriptor_public_from_string__static_method__Api(port_, arg0), + callFfi: (port_) => _platform.inner.wire_descriptor_public_from_string__static_method__Api(port_, arg0), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kDescriptorPublicFromStringStaticMethodApiConstMeta, argValues: [publicKey], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kDescriptorPublicFromStringStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "descriptor_public_from_string__static_method__Api", - argNames: ["publicKey"], - ); + FlutterRustBridgeTaskConstMeta get kDescriptorPublicFromStringStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "descriptor_public_from_string__static_method__Api", + argNames: ["publicKey"], + ); Future createDescriptorPublicStaticMethodApi( - {String? xpub, - required String path, - required bool derive, - dynamic hint}) { + {String? xpub, required String path, required bool derive, dynamic hint}) { var arg0 = _platform.api2wire_opt_String(xpub); var arg1 = _platform.api2wire_String(path); var arg2 = derive; return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner - .wire_create_descriptor_public__static_method__Api( - port_, arg0, arg1, arg2), + callFfi: (port_) => _platform.inner.wire_create_descriptor_public__static_method__Api(port_, arg0, arg1, arg2), parseSuccessData: _wire2api_String, + parseErrorData: _wire2api_error, constMeta: kCreateDescriptorPublicStaticMethodApiConstMeta, argValues: [xpub, path, derive], hint: hint, )); } - FlutterRustBridgeTaskConstMeta - get kCreateDescriptorPublicStaticMethodApiConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "create_descriptor_public__static_method__Api", - argNames: ["xpub", "path", "derive"], - ); + FlutterRustBridgeTaskConstMeta get kCreateDescriptorPublicStaticMethodApiConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "create_descriptor_public__static_method__Api", + argNames: ["xpub", "path", "derive"], + ); - Future